grape-swagger-entity 0.6.0 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e938d67caf864101c795754402fd3ddb4bee1f670f17a8d155e7d29a0cd1607a
4
- data.tar.gz: 970fb96ed3b1f9e52917e49d1bc21a6a74f5d3764bf0138e131156ed697bc64f
3
+ metadata.gz: d482687ea661169b18eb8f35ef06aa7601a57f4965c568b8f130c0451964465b
4
+ data.tar.gz: 31e4b9aa0f9d132aabaefd2463a0fcecb3758eddc2316a13a5c77e443a653a55
5
5
  SHA512:
6
- metadata.gz: 3d95a5256cd149e90feb4cd4bb1c5e0848071a38323c97767c98c2546b6c9869afd710d993538a7c6089598f4c3d05e78fb9c8c2b8d1e58e4a14f48eaf563efe
7
- data.tar.gz: 41656f10e6f06e5bdbe214e9443f72c72f7e7d4bd2a7bd25c9ee2d92c019f67626dcf02faf8c7a45085a392820b906e24d98a489f30a1511b440e2f3965c1eb8
6
+ metadata.gz: 865221ba8a968d4f52d0572c30b3bcbff87797827f36056a34b9addb7e6cdc496354fbc87d8e89ed0b39e22691a32797b129219666a6c19f5dc2837983161344
7
+ data.tar.gz: 2a87aa4e3b5219238d1c59e184c0e52acb2c8e9f077830117895fd7af554721631f64e3ce9be73b1f4573d9a4026a68a8805d2298c4717f2133b99cabe58aa2c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ ### 0.6.2 (2025/05/10)
2
+
3
+
4
+ #### Fixes
5
+
6
+ * [#82](https://github.com/ruby-grape/grape-swagger-entity/pull/82): Fix: simplify primitive types recognition - [@numbata](https://github.com/numbata).
7
+
8
+ ### 0.6.1 (2025/05/06)
9
+
10
+ #### Fixes
11
+
12
+ * [#79](https://github.com/ruby-grape/grape-swagger-entity/pull/79): Fix correctly handle class types like time in documentation - [@krororo](https://github.com/krororo).
13
+
1
14
  ### 0.6.0 (2025/04/26)
2
15
 
3
16
  #### Features
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # GrapeSwagger::Entity
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/grape-swagger-entity.svg)](https://badge.fury.io/rb/grape-swagger-entity)
4
- [![Build Status](https://github.com/ruby-grape/grape-swagger-entity/workflows/test/badge.svg?branch=master)](https://github.com/ruby-grape/grape-swagger-entity/actions)
4
+ [![Build Status](https://github.com/ruby-grape/grape-swagger-entity/actions/workflows/test.yml/badge.svg)](https://github.com/ruby-grape/grape-swagger-entity/actions/workflows/test.yml)
5
5
 
6
6
  ## Table of Contents
7
7
 
@@ -5,9 +5,6 @@ module GrapeSwagger
5
5
  class AttributeParser
6
6
  attr_reader :endpoint
7
7
 
8
- # The list of that doesn't handled by `GrapeSwagger::DocMethods::DataType.primitive?` method
9
- ADDITIONAL_PRIMITIVE_TYPES = %w[string array].freeze
10
-
11
8
  def initialize(endpoint)
12
9
  @endpoint = endpoint
13
10
  end
@@ -60,11 +57,8 @@ module GrapeSwagger
60
57
  end
61
58
 
62
59
  def primitive_type?(type)
63
- type_name = type.name&.downcase
64
- return false if type_name.nil?
65
-
66
- GrapeSwagger::DocMethods::DataType.primitive?(type_name) ||
67
- ADDITIONAL_PRIMITIVE_TYPES.include?(type_name)
60
+ data_type = GrapeSwagger::DocMethods::DataType.call(type)
61
+ GrapeSwagger::DocMethods::DataType.request_primitive?(data_type)
68
62
  end
69
63
 
70
64
  def data_type_from(entity_options)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module GrapeSwagger
4
4
  module Entity
5
- VERSION = '0.6.0'
5
+ VERSION = '0.6.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape-swagger-entity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kirill Zaitsev
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-04-26 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: grape-entity
@@ -84,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  - !ruby/object:Gem::Version
85
85
  version: '0'
86
86
  requirements: []
87
- rubygems_version: 3.6.2
87
+ rubygems_version: 3.6.8
88
88
  specification_version: 4
89
89
  summary: Grape swagger adapter to support grape-entity object parsing
90
90
  test_files: []