grape-swagger-entity 0.5.1 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 45d768ff8d366802a511df94e675aed675d4961c965ac39a130df0e5a5a47f73
4
- data.tar.gz: 29289e700cb29cd5d7078b58e04bb284c5ccad4da1f12e24917d31351cb2210c
3
+ metadata.gz: add308a25b9c529ea00b8527b3b435738f226a9af7c25e95aac0725c672b714b
4
+ data.tar.gz: a8e5cc48c165535bc489c8cff7879e5ad6cf4650996a8f9838a073bd1bfc3840
5
5
  SHA512:
6
- metadata.gz: f1f7cb9609b3412b6fb624aaae0346b34549349a40f7912d1c72131fa7c905f47f8307928edb18dbcbc3ba6cefed34ecd861c125b60b45d8cbe1f4633a036199
7
- data.tar.gz: b64399e310447774459e470cb7e9aa1621e2c544641ef16c6ec2e8a3a8cb472fff9cd8e33167a2b61d4939932aaca065172b01526ad099f0011fe989b2e4cdb0
6
+ metadata.gz: 2fd8fc5aff26713b93abf4290ce6c56054c3e497a860c9873c8a6675b1769807f6a236cdbe62961fae6891a4667fbd250579db4f2c5c82ef2875713d8917e90c
7
+ data.tar.gz: 54248e88317f33f1a12d2f7ede6b5f897e2b3e5ea21927b1fc4a078358a46cb6d36abff7455cebc11d066c9fd75421b044686dfb1417d76312953f9b6de96b54
@@ -0,0 +1,21 @@
1
+ name: danger
2
+ on: pull_request
3
+
4
+ jobs:
5
+ danger:
6
+ runs-on: ubuntu-latest
7
+ steps:
8
+ - uses: actions/checkout@v4
9
+ with:
10
+ fetch-depth: 100
11
+ - name: Set up Ruby
12
+ uses: ruby/setup-ruby@v1
13
+ with:
14
+ ruby-version: 3.2
15
+ bundler-cache: true
16
+ rubygems: latest
17
+ - name: Run Danger
18
+ run: |
19
+ # the token is public, has public_repo scope and belongs to the grape-bot user owned by @dblock, this is ok
20
+ TOKEN=$(echo -n Z2hwX2lYb0dPNXNyejYzOFJyaTV3QUxUdkNiS1dtblFwZTFuRXpmMwo= | base64 --decode)
21
+ DANGER_GITHUB_API_TOKEN=$TOKEN bundle exec danger --verbose
@@ -0,0 +1,43 @@
1
+ name: test
2
+
3
+ on: [push, pull_request]
4
+
5
+ permissions:
6
+ contents: read
7
+
8
+ jobs:
9
+ lint:
10
+ name: RuboCop
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v3
14
+
15
+ - name: Set up Ruby
16
+ uses: ruby/setup-ruby@v1
17
+ with:
18
+ ruby-version: 3.2
19
+ bundler-cache: true
20
+ rubygems: latest
21
+
22
+ - name: Run RuboCop
23
+ run: bundle exec rubocop
24
+
25
+ test:
26
+ env:
27
+ GRAPE_ENTITY: 0.8.0
28
+
29
+ runs-on: ubuntu-latest
30
+ strategy:
31
+ fail-fast: false
32
+ matrix:
33
+ ruby-version: ['3.0', '3.1', '3.2']
34
+
35
+ steps:
36
+ - uses: actions/checkout@v3
37
+ - name: Set up Ruby
38
+ uses: ruby/setup-ruby@v1
39
+ with:
40
+ ruby-version: ${{ matrix.ruby-version }}
41
+ bundler-cache: true
42
+ - name: Run tests
43
+ run: bundle exec rake spec
data/.gitignore CHANGED
@@ -8,4 +8,5 @@
8
8
  /spec/reports/
9
9
  /tmp/
10
10
  .ruby-gemset
11
- .ruby-version
11
+ .ruby-version
12
+ /.idea
data/.rubocop.yml CHANGED
@@ -1,4 +1,5 @@
1
1
  AllCops:
2
+ NewCops: enable
2
3
  Exclude:
3
4
  - vendor/**/*
4
5
  TargetRubyVersion:
@@ -6,18 +7,6 @@ AllCops:
6
7
 
7
8
  inherit_from: .rubocop_todo.yml
8
9
 
9
- Metrics/BlockLength:
10
- Exclude:
11
- - spec/**/*
12
-
13
- Metrics/LineLength:
14
- Exclude:
15
- - spec/**/*
16
-
17
- Metrics/MethodLength:
18
- Exclude:
19
- - spec/**/*
20
-
21
10
  Naming/FileName:
22
11
  Enabled: false
23
12
 
data/.rubocop_todo.yml CHANGED
@@ -1,44 +1,96 @@
1
1
  # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2020-06-29 22:12:50 UTC using RuboCop version 0.86.0.
2
+ # `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 5000`
3
+ # on 2023-07-06 20:16:40 UTC using RuboCop version 1.42.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
9
  # Offense count: 1
10
- # Configuration parameters: Include.
10
+ # Configuration parameters: Severity, Include.
11
11
  # Include: **/*.gemspec
12
12
  Gemspec/RequiredRubyVersion:
13
13
  Exclude:
14
14
  - 'grape-swagger-entity.gemspec'
15
15
 
16
+ # Offense count: 3
17
+ # Configuration parameters: AllowedMethods.
18
+ # AllowedMethods: enums
19
+ Lint/ConstantDefinitionInBlock:
20
+ Exclude:
21
+ - 'spec/grape-swagger/entities/response_model_spec.rb'
22
+ - 'spec/support/shared_contexts/inheritance_api.rb'
23
+ - 'spec/support/shared_contexts/this_api.rb'
24
+
25
+ # Offense count: 1
26
+ # Configuration parameters: AllowComments, AllowEmptyLambdas.
27
+ Lint/EmptyBlock:
28
+ Exclude:
29
+ - 'spec/grape-swagger/entity/attribute_parser_spec.rb'
30
+
31
+ # Offense count: 1
32
+ # This cop supports unsafe autocorrection (--autocorrect-all).
33
+ # Configuration parameters: AllowedMethods.
34
+ # AllowedMethods: instance_of?, kind_of?, is_a?, eql?, respond_to?, equal?
35
+ Lint/RedundantSafeNavigation:
36
+ Exclude:
37
+ - 'lib/grape-swagger/entity/attribute_parser.rb'
38
+
16
39
  # Offense count: 4
17
- # Configuration parameters: IgnoredMethods.
40
+ # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods, CountRepeatedAttributes, Max.
18
41
  Metrics/AbcSize:
19
- Max: 30
42
+ Exclude:
43
+ - 'lib/grape-swagger/entity/attribute_parser.rb'
44
+ - 'lib/grape-swagger/entity/parser.rb'
45
+
46
+ # Offense count: 13
47
+ # Configuration parameters: CountComments, Max, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods.
48
+ # AllowedMethods: refine
49
+ Metrics/BlockLength:
50
+ Exclude:
51
+ - '**/*.gemspec'
52
+ - 'spec/grape-swagger/entities/response_model_spec.rb'
53
+ - 'spec/grape-swagger/entity/attribute_parser_spec.rb'
54
+ - 'spec/grape-swagger/entity/parser_spec.rb'
55
+ - 'spec/support/shared_contexts/this_api.rb'
20
56
 
21
57
  # Offense count: 1
22
- # Configuration parameters: CountComments.
58
+ # Configuration parameters: CountComments, Max, CountAsOne.
23
59
  Metrics/ClassLength:
24
- Max: 111
60
+ Exclude:
61
+ - 'lib/grape-swagger/entity/parser.rb'
25
62
 
26
63
  # Offense count: 2
27
- # Configuration parameters: IgnoredMethods.
64
+ # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods, Max.
28
65
  Metrics/CyclomaticComplexity:
29
- Max: 11
66
+ Exclude:
67
+ - 'lib/grape-swagger/entity/attribute_parser.rb'
68
+ - 'lib/grape-swagger/entity/parser.rb'
30
69
 
31
70
  # Offense count: 5
32
- # Configuration parameters: CountComments, ExcludedMethods.
71
+ # Configuration parameters: CountComments, Max, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods.
33
72
  Metrics/MethodLength:
34
- Max: 25
73
+ Exclude:
74
+ - 'lib/grape-swagger/entity/attribute_parser.rb'
75
+ - 'lib/grape-swagger/entity/parser.rb'
35
76
 
36
77
  # Offense count: 2
37
- # Configuration parameters: IgnoredMethods.
78
+ # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods, Max.
38
79
  Metrics/PerceivedComplexity:
39
- Max: 12
80
+ Exclude:
81
+ - 'lib/grape-swagger/entity/attribute_parser.rb'
82
+ - 'lib/grape-swagger/entity/parser.rb'
83
+
84
+ # Offense count: 2
85
+ # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
86
+ # SupportedStyles: snake_case, normalcase, non_integer
87
+ # AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339
88
+ Naming/VariableNumber:
89
+ Exclude:
90
+ - 'spec/grape-swagger/entities/response_model_spec.rb'
40
91
 
41
92
  # Offense count: 4
93
+ # Configuration parameters: AllowedConstants.
42
94
  Style/Documentation:
43
95
  Exclude:
44
96
  - 'spec/**/*'
@@ -46,3 +98,9 @@ Style/Documentation:
46
98
  - 'lib/grape-swagger/entity.rb'
47
99
  - 'lib/grape-swagger/entity/attribute_parser.rb'
48
100
  - 'lib/grape-swagger/entity/parser.rb'
101
+
102
+ # Offense count: 4
103
+ Style/OpenStructUse:
104
+ Exclude:
105
+ - 'spec/grape-swagger/entities/response_model_spec.rb'
106
+ - 'spec/support/shared_contexts/this_api.rb'
data/CHANGELOG.md CHANGED
@@ -8,17 +8,30 @@
8
8
 
9
9
  * Your contribution here.
10
10
 
11
- ### 0.5.1 (June 30, 2020)
11
+ ### 0.5.3 (2024/02/02)
12
12
 
13
13
  #### Features
14
14
 
15
- * [#50](https://github.com/ruby-grape/grape-swagger-entity/pull/50): Features/inheritance and discriminator - [@MaximeRDY](https://github.com/MaximeRDY).
15
+ * [#64](https://github.com/ruby-grape/grape-swagger-entity/pull/64): Pass extension documentation into schema - [@numbata](https://github.com/numbata).
16
+
17
+ #### Fixes
16
18
 
17
- ### 0.5.0 (June 29, 2020)
19
+ * [#66](https://github.com/ruby-grape/grape-swagger-entity/pull/66): Fix danger GHA - [@mscrivo](https://github.com/mscrivo).
20
+
21
+ ### 0.5.2 (2023/07/07)
22
+
23
+ #### Fixes
18
24
 
19
- Yanked due to invalid dependency
25
+ * [#60](https://github.com/ruby-grape/grape-swagger-entity/pull/60): Examples on arrays should be directly on the property, not on the item - [@collinsauve](https://github.com/collinsauve).
26
+ * [#61](https://github.com/ruby-grape/grape-swagger-entity/pull/61): Migrate from Travis to GHA for CI - [@mscrivo](https://github.com/mscrivo).
27
+
28
+ ### 0.5.1 (2020/06/30)
29
+
30
+ #### Features
31
+
32
+ * [#50](https://github.com/ruby-grape/grape-swagger-entity/pull/50): Features/inheritance and discriminator - [@MaximeRDY](https://github.com/MaximeRDY).
20
33
 
21
- ### 0.4.0 (May 30, 2020)
34
+ ### 0.4.0 (2020/05/30)
22
35
 
23
36
  #### Features
24
37
 
@@ -29,81 +42,81 @@ Yanked due to invalid dependency
29
42
 
30
43
  * [#46](https://github.com/ruby-grape/grape-swagger-entity/pull/46): Fixed issue where a boolean example value of false would not display in swagger file - [@drewnichols](https://github.com/drewnichols).
31
44
 
32
- ### 0.3.4 (January 9, 2020)
45
+ ### 0.3.4 (2020/01/09)
33
46
 
34
47
  #### Features
35
48
 
36
49
  * [#40](https://github.com/ruby-grape/grape-swagger-entity/pull/40): Add support for minLength and maxLength - [@fotos](https://github.com/fotos).
37
50
 
38
- ### 0.3.3 (Fabruary 22, 2019)
51
+ ### 0.3.3 (2019/02/22)
39
52
 
40
53
  #### Features
41
54
 
42
55
  * [#39](https://github.com/ruby-grape/grape-swagger-entity/pull/39): Fix to avoid conflict with polymorphic model - [@kinoppyd](https://github.com/kinoppyd).
43
56
 
44
- ### 0.3.2 (January 15, 2019)
57
+ ### 0.3.2 (2019/01/15)
45
58
 
46
59
  #### Features
47
60
 
48
61
  * [#38](https://github.com/ruby-grape/grape-swagger-entity/pull/38): Added support for hidden option for documentation - [@vitoravelino](https://github.com/vitoravelino).
49
62
 
50
- ### 0.3.1 (November 26, 2018)
63
+ ### 0.3.1 (2018/11/26)
51
64
 
52
65
  #### Features
53
66
 
54
67
  * [#37](https://github.com/ruby-grape/grape-swagger-entity/pull/37): Add support for minItems, maxItems and uniqueItems - [@fotos](https://github.com/fotos).
55
68
 
56
- ### 0.3.0 (August 22, 2018)
69
+ ### 0.3.0 (2018/08/22)
57
70
 
58
71
  #### Features
59
72
 
60
73
  * [#35](https://github.com/ruby-grape/grape-swagger-entity/pull/35): Support for required attributes - [@Bugagazavr](https://github.com/Bugagazavr).
61
74
 
62
- ### 0.2.5 (April 26, 2018)
75
+ ### 0.2.5 (2018/04/26)
63
76
 
64
77
  #### Features
65
78
 
66
79
  * [#33](https://github.com/ruby-grape/grape-swagger-entity/pull/33): Update parser to respect merge option for entities - [@b-boogaard](https://github.com/b-boogaard).
67
80
 
68
- ### 0.2.4 (April 3, 2018)
81
+ ### 0.2.4 (2018/04/03)
69
82
 
70
83
  #### Fixes
71
84
 
72
85
  * [#32](https://github.com/ruby-grape/grape-swagger-entity/pull/32): Fix issue with read_only fields - [@mcfilib](https://github.com/mcfilib).
73
86
 
74
- ### 0.2.3 (November 19, 2017)
87
+ ### 0.2.3 (2017/11/19)
75
88
 
76
89
  #### Fixes
77
90
 
78
91
  * [#30](https://github.com/ruby-grape/grape-swagger-entity/pull/30): Fix nested exposures with an alias - [@Kukunin](https://github.com/Kukunin).
79
92
  * [#31](https://github.com/ruby-grape/grape-swagger-entity/pull/31): Respect `required: true` for nested attributes as well - [@Kukunin](https://github.com/Kukunin).
80
93
 
81
- ### 0.2.2 (November 3, 2017)
94
+ ### 0.2.2 (2017/11/3)
82
95
 
83
96
  #### Features
84
97
 
85
98
  * [#27](https://github.com/ruby-grape/grape-swagger-entity/pull/27): Add support for attribute examples - [@Kukunin](https://github.com/Kukunin).
86
99
 
87
- ### 0.2.1 (Jule 5, 2017)
100
+ ### 0.2.1 (2017/07/05)
88
101
 
89
102
  #### Features
90
103
 
91
104
  * [#26](https://github.com/ruby-grape/grape-swagger-entity/pull/26): Add support for read only field - [@FChaack](https://github.com/FChaack).
92
105
 
93
- ### 0.2.0 (March 2, 2017)
106
+ ### 0.2.0 (2017/03/02)
94
107
 
95
108
  #### Features
96
109
 
97
110
  * [#22](https://github.com/ruby-grape/grape-swagger-entity/pull/22): Nested exposures - [@Bugagazavr](https://github.com/Bugagazavr).
98
111
 
99
- ### 0.1.6 (February 3, 2017)
112
+ ### 0.1.6 (2017/02/03)
100
113
 
101
114
  #### Features
102
115
 
103
116
  * [#21](https://github.com/ruby-grape/grape-swagger-entity/pull/21): Adds support for own format - [@LeFnord](https://github.com/LeFnord).
104
117
  * [#19](https://github.com/ruby-grape/grape-swagger-entity/pull/19): Adds support for default value - [@LeFnord](https://github.com/LeFnord).
105
118
 
106
- ### 0.1.5 (November 21, 2016)
119
+ ### 0.1.5 (2016/11/21)
107
120
 
108
121
  #### Features
109
122
 
@@ -115,7 +128,7 @@ Yanked due to invalid dependency
115
128
  * [#8](https://github.com/ruby-grape/grape-swagger-entity/pull/8): Generate enum property if values key is passed in documentation - [@lordnibbler](https://github.com/lordnibbler).
116
129
  * [#15](https://github.com/ruby-grape/grape-swagger-entity/pull/15): Support grape entity 0.6.x and later - [@Bugagazavr](https://github.com/Bugagazavr).
117
130
 
118
- ### 0.1.4 (June 7, 2016)
131
+ ### 0.1.4 (2016/06/07)
119
132
 
120
133
  #### Fixes
121
134
 
data/Gemfile CHANGED
@@ -14,14 +14,14 @@ group :development, :test do
14
14
  gem 'rack-test'
15
15
  gem 'rake'
16
16
  gem 'rdoc'
17
- gem 'rspec', '~> 3.9'
18
- gem 'rubocop', '~> 0.85'
17
+ gem 'rspec'
18
+ gem 'rubocop'
19
19
  end
20
20
 
21
21
  gem 'grape-swagger', git: 'https://github.com/ruby-grape/grape-swagger.git'
22
22
 
23
23
  group :test do
24
24
  gem 'grape-entity', ENV.fetch('GRAPE_ENTITY', '0.6.1')
25
- gem 'ruby-grape-danger', '~> 0.1.1', require: false
25
+ gem 'ruby-grape-danger', '~> 0.2.1', require: false
26
26
  gem 'simplecov', require: false
27
27
  end
data/README.md CHANGED
@@ -1,4 +1,18 @@
1
- # GrapeSwagger::Entity [![Build Status](https://travis-ci.org/ruby-grape/grape-swagger-entity.svg)](https://travis-ci.org/ruby-grape/grape-swagger-entity)
1
+ # GrapeSwagger::Entity
2
+
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)
5
+
6
+ ## Table of Contents
7
+
8
+ - [What is grape-swagger-entity?](#what-is-grape-swagger-entity)
9
+ - [Installation](#installation)
10
+ - [Development](#development)
11
+ - [Contributing](#contributing)
12
+ - [License](#license)
13
+
14
+
15
+ ## What is grape-swagger-entity?
2
16
 
3
17
  A simple grape-swagger adapter to allow parse representers as response model
4
18
 
data/RELEASING.md ADDED
@@ -0,0 +1,64 @@
1
+ # Releasing Grape-Swagger-Entity
2
+
3
+ There are no particular rules about when to release Grape-Swagger-Entity. Release bug fixes frequent, features not so frequently and breaking API changes rarely.
4
+
5
+ ### Release
6
+
7
+ Run tests, check that all tests succeed locally.
8
+
9
+ ```
10
+ bundle install
11
+ rake
12
+ ```
13
+
14
+ Check that the last build succeeded in [GitHub Actions](https://github.com/ruby-grape/grape-swagger-entity/actions) for all supported platforms.
15
+
16
+ Increment the version, modify [lib/grape-swagger/entity/version.rb](lib/grape-swagger/entity/version.rb).
17
+
18
+ * Increment the third number if the release has bug fixes and/or very minor features, only (eg. change `0.1.0` to `0.1.1`).
19
+ * Increment the second number if the release contains major features or breaking API changes (eg. change `0.1.0` to `0.2.0`).
20
+
21
+ Change "Next Release" in [CHANGELOG.md](CHANGELOG.md) to the new version.
22
+
23
+ ```
24
+ ### 0.1.1 (February 5, 2015)
25
+ ```
26
+
27
+ Remove the line with "Your contribution here.", since there will be no more contributions to this release.
28
+
29
+ Commit your changes.
30
+
31
+ ```
32
+ git add CHANGELOG.md lib/grape-swagger-entity/version.rb
33
+ git commit -m "Preparing for release, 0.1.1."
34
+ git push origin master
35
+ ```
36
+
37
+ Release.
38
+
39
+ ```
40
+ $ rake release
41
+
42
+ Grape-Swagger-Entity 0.1.1 built to pkg/grape-swagger-entity-0.1.1.gem.
43
+ Tagged v0.1.1.
44
+ Pushed git commits and tags.
45
+ Pushed grape-swagger-entity 0.1.1 to rubygems.org.
46
+ ```
47
+
48
+ ### Prepare for the Next Version
49
+
50
+ Add the next release to [CHANGELOG.md](CHANGELOG.md).
51
+
52
+ ```
53
+ ### Next Release
54
+
55
+ * Your contribution here.
56
+ ```
57
+
58
+ Commit your changes.
59
+
60
+ ```
61
+ git add CHANGELOG.md
62
+ git commit -m "Preparing for next release."
63
+ git push origin master
64
+ ```
@@ -22,4 +22,5 @@ Gem::Specification.new do |s|
22
22
  s.required_ruby_version = '>= 2.4'
23
23
  s.add_runtime_dependency 'grape-entity', '>= 0.6.0'
24
24
  s.add_runtime_dependency 'grape-swagger', '>= 1.2.0'
25
+ s.metadata['rubygems_mfa_required'] = 'true'
25
26
  end
@@ -19,6 +19,7 @@ module GrapeSwagger
19
19
  entity_model_type = entity_model_type(name, entity_options)
20
20
  return entity_model_type unless documentation
21
21
 
22
+ add_extension_documentation(entity_model_type, documentation)
22
23
  add_array_documentation(entity_model_type, documentation) if documentation[:is_array]
23
24
 
24
25
  entity_model_type
@@ -26,11 +27,8 @@ module GrapeSwagger
26
27
  param = data_type_from(entity_options)
27
28
  return param unless documentation
28
29
 
29
- add_attribute_sample(param, documentation, :default)
30
- add_attribute_sample(param, documentation, :example)
31
-
32
- if (values = documentation[:values])
33
- param[:enum] = values if values.is_a?(Array)
30
+ if (values = documentation[:values]) && values.is_a?(Array)
31
+ param[:enum] = values
34
32
  end
35
33
 
36
34
  if documentation[:is_array]
@@ -38,6 +36,9 @@ module GrapeSwagger
38
36
  add_array_documentation(param, documentation)
39
37
  end
40
38
 
39
+ add_attribute_sample(param, documentation, :default)
40
+ add_attribute_sample(param, documentation, :example)
41
+
41
42
  add_attribute_documentation(param, documentation)
42
43
 
43
44
  add_extension_documentation(param, documentation)
@@ -74,7 +75,7 @@ module GrapeSwagger
74
75
 
75
76
  def data_type_from(documentation)
76
77
  documented_type = documentation[:type]
77
- documented_type ||= (documentation[:documentation] && documentation[:documentation][:type])
78
+ documented_type ||= documentation[:documentation] && documentation[:documentation][:type]
78
79
 
79
80
  data_type = GrapeSwagger::DocMethods::DataType.call(documented_type)
80
81
 
@@ -3,9 +3,7 @@
3
3
  module GrapeSwagger
4
4
  module Entity
5
5
  class Parser
6
- attr_reader :model
7
- attr_reader :endpoint
8
- attr_reader :attribute_parser
6
+ attr_reader :model, :endpoint, :attribute_parser
9
7
 
10
8
  def initialize(model, endpoint)
11
9
  @model = model
@@ -2,6 +2,6 @@
2
2
 
3
3
  module GrapeSwagger
4
4
  module Entity
5
- VERSION = '0.5.1'
5
+ VERSION = '0.5.3'
6
6
  end
7
7
  end
@@ -13,4 +13,4 @@ module GrapeSwagger
13
13
  end
14
14
  end
15
15
 
16
- GrapeSwagger.model_parsers.register(::GrapeSwagger::Entity::Parser, ::Grape::Entity)
16
+ GrapeSwagger.model_parsers.register(GrapeSwagger::Entity::Parser, Grape::Entity)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape-swagger-entity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kirill Zaitsev
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-06-30 00:00:00.000000000 Z
11
+ date: 2024-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grape-entity
@@ -38,23 +38,25 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 1.2.0
41
- description:
41
+ description:
42
42
  email:
43
43
  - kirik910@gmail.com
44
44
  executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
+ - ".github/workflows/danger.yml"
49
+ - ".github/workflows/test.yml"
48
50
  - ".gitignore"
49
51
  - ".rspec"
50
52
  - ".rubocop.yml"
51
53
  - ".rubocop_todo.yml"
52
- - ".travis.yml"
53
54
  - CHANGELOG.md
54
55
  - Dangerfile
55
56
  - Gemfile
56
57
  - LICENSE.txt
57
58
  - README.md
59
+ - RELEASING.md
58
60
  - Rakefile
59
61
  - bin/pry
60
62
  - bin/setup
@@ -68,8 +70,9 @@ files:
68
70
  homepage: https://github.com/ruby-grape/grape-swagger-entity
69
71
  licenses:
70
72
  - MIT
71
- metadata: {}
72
- post_install_message:
73
+ metadata:
74
+ rubygems_mfa_required: 'true'
75
+ post_install_message:
73
76
  rdoc_options: []
74
77
  require_paths:
75
78
  - lib
@@ -84,8 +87,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
87
  - !ruby/object:Gem::Version
85
88
  version: '0'
86
89
  requirements: []
87
- rubygems_version: 3.0.3
88
- signing_key:
90
+ rubygems_version: 3.5.3
91
+ signing_key:
89
92
  specification_version: 4
90
93
  summary: Grape swagger adapter to support grape-entity object parsing
91
94
  test_files: []
data/.travis.yml DELETED
@@ -1,36 +0,0 @@
1
- language: ruby
2
-
3
- sudo: false
4
-
5
- before_install:
6
- - gem update --system
7
- - gem install bundler
8
-
9
- after_success:
10
- - bundle exec danger
11
-
12
- rvm:
13
- - 2.5.8
14
- - 2.6.6
15
- - 2.7.1
16
-
17
- env:
18
- - GRAPE_ENTITY=0.6.1
19
- - GRAPE_ENTITY=0.7.1
20
- - GRAPE_ENTITY=0.8.0
21
-
22
- matrix:
23
- fast_finish: true
24
-
25
- include:
26
- - rvm: 2.4.10
27
- env:
28
- - rvm: ruby-head
29
- env:
30
- - rvm: jruby-head
31
- env:
32
-
33
- allow_failures:
34
- - rvm: 2.4.10
35
- - rvm: ruby-head
36
- - rvm: jruby-head