apipie-rails 1.2.3 → 1.4.0
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 +4 -4
- data/.github/workflows/build.yml +5 -4
- data/.github/workflows/rubocop-challenger.yml +1 -3
- data/.github/workflows/rubocop.yml +1 -1
- data/.rubocop_todo.yml +22 -28
- data/CHANGELOG.md +22 -0
- data/Gemfile +2 -3
- data/README.md +2088 -0
- data/apipie-rails.gemspec +7 -1
- data/app/views/apipie/apipies/_method_detail.erb +2 -0
- data/app/views/apipie/apipies/_params.html.erb +1 -0
- data/app/views/apipie/apipies/_params_plain.html.erb +1 -0
- data/config/locales/en.yml +1 -0
- data/config/locales/ko.yml +1 -0
- data/lib/apipie/application.rb +1 -1
- data/lib/apipie/dsl_definition.rb +10 -11
- data/lib/apipie/errors.rb +1 -1
- data/lib/apipie/extractor/collector.rb +1 -1
- data/lib/apipie/extractor/recorder.rb +1 -1
- data/lib/apipie/extractor/writer.rb +2 -2
- data/lib/apipie/generator/swagger/config.rb +1 -1
- data/lib/apipie/generator/swagger/method_description/parameters_service.rb +1 -1
- data/lib/apipie/generator/swagger/method_description/response_service.rb +14 -1
- data/lib/apipie/generator/swagger/param_description/builder.rb +9 -0
- data/lib/apipie/generator/swagger/param_description/type.rb +15 -2
- data/lib/apipie/generator/swagger/resource_description_collection.rb +2 -2
- data/lib/apipie/param_description.rb +1 -1
- data/lib/apipie/response_description.rb +34 -9
- data/lib/apipie/response_description_adapter.rb +3 -3
- data/lib/apipie/routes_formatter.rb +1 -1
- data/lib/apipie/static_dispatcher.rb +7 -1
- data/lib/apipie/version.rb +1 -1
- data/lib/tasks/apipie.rake +3 -3
- data/rel-eng/gem_release.ipynb +5 -5
- data/spec/controllers/users_controller_spec.rb +1 -1
- data/spec/dummy/app/controllers/api/v2/empty_middle_controller.rb +1 -1
- data/spec/dummy/app/controllers/pets_controller.rb +2 -2
- data/spec/dummy/app/controllers/twitter_example_controller.rb +3 -3
- data/spec/lib/apipie/apipies_controller_spec.rb +1 -1
- data/spec/lib/apipie/extractor_spec.rb +1 -1
- data/spec/lib/apipie/file_handler_spec.rb +1 -1
- data/spec/lib/apipie/generator/swagger/method_description/response_schema_service_spec.rb +6 -6
- data/spec/lib/apipie/generator/swagger/method_description/response_service_spec.rb +62 -0
- data/spec/lib/apipie/generator/swagger/param_description/builder_spec.rb +14 -2
- data/spec/lib/apipie/generator/swagger/param_description/type_spec.rb +6 -1
- data/spec/lib/apipie/param_description_spec.rb +1 -1
- data/spec/lib/apipie/response_description/response_object_spec.rb +22 -0
- data/spec/lib/apipie/response_description_spec.rb +56 -0
- data/spec/lib/apipie/swagger_generator_spec.rb +2 -2
- data/spec/lib/swagger/rake_swagger_spec.rb +6 -1
- data/spec/lib/swagger/swagger_dsl_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +12 -6
- data/README.rst +0 -1965
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad4ac03f9bd83b8517dacdc1827c821bf9413649984eb84dee775ce7972a9e7d
|
4
|
+
data.tar.gz: 4dfa2be9dcc9ac7aab06b930164beb1eede84351c1f9a0eef23aef6e224985cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98af0fe369f7b730c7dbf5a40d8c63e67ae2ca0f5b201ad4510827090a634cb30965dd5c737b46c26bd1e2084153481671e606ee970a814c859277a3eacadd2c
|
7
|
+
data.tar.gz: 5db3aef55422e20fc2b5bcafd2df97daf2ee10a0c09947b77791f614665615d8a607e393a76a72bdbb5f718ff879b048ab49fb49edebd70376fe284d5cb2967a
|
data/.github/workflows/build.yml
CHANGED
@@ -8,9 +8,11 @@ jobs:
|
|
8
8
|
strategy:
|
9
9
|
fail-fast: false
|
10
10
|
matrix:
|
11
|
-
rails: ["7.0", "6.1", "6.0"]
|
12
|
-
ruby: ["3.
|
11
|
+
rails: ["7.1", "7.0", "6.1", "6.0"]
|
12
|
+
ruby: ["3.3", "3.2", "3.1", "3.0", "2.7"]
|
13
13
|
include:
|
14
|
+
- rails: "7.1"
|
15
|
+
ruby: "3.4.0-preview1"
|
14
16
|
- rails: "5.2"
|
15
17
|
ruby: "2.7.8"
|
16
18
|
- rails: "5.1"
|
@@ -19,11 +21,10 @@ jobs:
|
|
19
21
|
ruby: "2.6.10"
|
20
22
|
|
21
23
|
env:
|
22
|
-
RUBY_VERSION: ${{ matrix.ruby }}
|
23
24
|
RAILS_VERSION: ${{ matrix.rails }}
|
24
25
|
|
25
26
|
steps:
|
26
|
-
- uses: actions/checkout@
|
27
|
+
- uses: actions/checkout@v4
|
27
28
|
- uses: ruby/setup-ruby@v1
|
28
29
|
with:
|
29
30
|
ruby-version: ${{ matrix.ruby }}
|
@@ -8,10 +8,8 @@ jobs:
|
|
8
8
|
create-pr:
|
9
9
|
name: Create Pull Request
|
10
10
|
runs-on: ubuntu-latest
|
11
|
-
env:
|
12
|
-
BUNDLE_GEMFILE: gemfiles/Gemfile.rails50
|
13
11
|
steps:
|
14
|
-
- uses: actions/checkout@
|
12
|
+
- uses: actions/checkout@v4
|
15
13
|
- name: Set up Ruby 3.2
|
16
14
|
uses: ruby/setup-ruby@v1
|
17
15
|
with:
|
data/.rubocop_todo.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# This configuration was generated by
|
2
|
-
# `rubocop --auto-gen-config --exclude-limit
|
3
|
-
# on 2023-
|
2
|
+
# `rubocop --auto-gen-config --exclude-limit 200`
|
3
|
+
# on 2023-10-11 12:02:42 UTC using RuboCop version 1.57.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
|
@@ -118,7 +118,7 @@ Layout/ElseAlignment:
|
|
118
118
|
- 'lib/apipie/param_description.rb'
|
119
119
|
- 'lib/apipie/resource_description.rb'
|
120
120
|
|
121
|
-
# Offense count:
|
121
|
+
# Offense count: 59
|
122
122
|
# This cop supports safe autocorrection (--autocorrect).
|
123
123
|
Layout/EmptyLineAfterGuardClause:
|
124
124
|
Exclude:
|
@@ -140,7 +140,7 @@ Layout/EmptyLineAfterGuardClause:
|
|
140
140
|
|
141
141
|
# Offense count: 13
|
142
142
|
# This cop supports safe autocorrection (--autocorrect).
|
143
|
-
# Configuration parameters: EmptyLineBetweenMethodDefs, EmptyLineBetweenClassDefs, EmptyLineBetweenModuleDefs, AllowAdjacentOneLineDefs, NumberOfEmptyLines.
|
143
|
+
# Configuration parameters: EmptyLineBetweenMethodDefs, EmptyLineBetweenClassDefs, EmptyLineBetweenModuleDefs, DefLikeMacros, AllowAdjacentOneLineDefs, NumberOfEmptyLines.
|
144
144
|
Layout/EmptyLineBetweenDefs:
|
145
145
|
Exclude:
|
146
146
|
- 'app/controllers/apipie/apipies_controller.rb'
|
@@ -597,14 +597,13 @@ Layout/SpaceInsideParens:
|
|
597
597
|
- 'spec/lib/apipie/method_description/apis_service_spec.rb'
|
598
598
|
- 'spec/lib/swagger/swagger_dsl_spec.rb'
|
599
599
|
|
600
|
-
# Offense count:
|
600
|
+
# Offense count: 14
|
601
601
|
# This cop supports safe autocorrection (--autocorrect).
|
602
602
|
# Configuration parameters: EnforcedStyle.
|
603
603
|
# SupportedStyles: final_newline, final_blank_line
|
604
604
|
Layout/TrailingEmptyLines:
|
605
605
|
Exclude:
|
606
606
|
- 'Rakefile'
|
607
|
-
- 'lib/apipie/extractor/collector.rb'
|
608
607
|
- 'lib/apipie/method_description/apis_service.rb'
|
609
608
|
- 'lib/apipie/rspec/response_validation_helper.rb'
|
610
609
|
- 'spec/controllers/concerns_controller_spec.rb'
|
@@ -778,23 +777,17 @@ Lint/Void:
|
|
778
777
|
Exclude:
|
779
778
|
- 'spec/controllers/users_controller_spec.rb'
|
780
779
|
|
781
|
-
# Offense count:
|
780
|
+
# Offense count: 60
|
782
781
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
783
782
|
Metrics/AbcSize:
|
784
783
|
Max: 96
|
785
784
|
|
786
|
-
# Offense count:
|
787
|
-
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
|
788
|
-
# AllowedMethods: refine
|
789
|
-
Metrics/BlockLength:
|
790
|
-
Max: 26
|
791
|
-
|
792
|
-
# Offense count: 4
|
785
|
+
# Offense count: 3
|
793
786
|
# Configuration parameters: CountBlocks.
|
794
787
|
Metrics/BlockNesting:
|
795
788
|
Max: 4
|
796
789
|
|
797
|
-
# Offense count:
|
790
|
+
# Offense count: 25
|
798
791
|
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
799
792
|
Metrics/CyclomaticComplexity:
|
800
793
|
Max: 24
|
@@ -807,7 +800,7 @@ Metrics/MethodLength:
|
|
807
800
|
# Offense count: 1
|
808
801
|
# Configuration parameters: CountComments, CountAsOne.
|
809
802
|
Metrics/ModuleLength:
|
810
|
-
Max:
|
803
|
+
Max: 119
|
811
804
|
|
812
805
|
# Offense count: 4
|
813
806
|
# Configuration parameters: CountKeywordArgs.
|
@@ -815,7 +808,7 @@ Metrics/ParameterLists:
|
|
815
808
|
MaxOptionalParameters: 5
|
816
809
|
Max: 6
|
817
810
|
|
818
|
-
# Offense count:
|
811
|
+
# Offense count: 21
|
819
812
|
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
820
813
|
Metrics/PerceivedComplexity:
|
821
814
|
Max: 25
|
@@ -961,7 +954,7 @@ RSpec/Be:
|
|
961
954
|
- 'spec/controllers/concerns_controller_spec.rb'
|
962
955
|
- 'spec/controllers/users_controller_spec.rb'
|
963
956
|
|
964
|
-
# Offense count:
|
957
|
+
# Offense count: 60
|
965
958
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
966
959
|
RSpec/BeEq:
|
967
960
|
Exclude:
|
@@ -1054,7 +1047,7 @@ RSpec/EmptyLineAfterHook:
|
|
1054
1047
|
Exclude:
|
1055
1048
|
- 'spec/lib/apipie/apipies_controller_spec.rb'
|
1056
1049
|
|
1057
|
-
# Offense count:
|
1050
|
+
# Offense count: 52
|
1058
1051
|
# Configuration parameters: CountAsOne.
|
1059
1052
|
RSpec/ExampleLength:
|
1060
1053
|
Max: 85
|
@@ -1148,12 +1141,12 @@ RSpec/MessageSpies:
|
|
1148
1141
|
RSpec/MultipleExpectations:
|
1149
1142
|
Max: 19
|
1150
1143
|
|
1151
|
-
# Offense count:
|
1144
|
+
# Offense count: 160
|
1152
1145
|
# Configuration parameters: AllowSubject.
|
1153
1146
|
RSpec/MultipleMemoizedHelpers:
|
1154
1147
|
Max: 15
|
1155
1148
|
|
1156
|
-
# Offense count:
|
1149
|
+
# Offense count: 85
|
1157
1150
|
# Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
|
1158
1151
|
# SupportedStyles: always, named_only
|
1159
1152
|
RSpec/NamedSubject:
|
@@ -1173,7 +1166,7 @@ RSpec/NamedSubject:
|
|
1173
1166
|
- 'spec/lib/swagger/rake_swagger_spec.rb'
|
1174
1167
|
- 'spec/lib/swagger/swagger_dsl_spec.rb'
|
1175
1168
|
|
1176
|
-
# Offense count:
|
1169
|
+
# Offense count: 96
|
1177
1170
|
# Configuration parameters: AllowedGroups.
|
1178
1171
|
RSpec/NestedGroups:
|
1179
1172
|
Max: 6
|
@@ -1235,14 +1228,14 @@ RSpec/StubbedMock:
|
|
1235
1228
|
- 'spec/lib/apipie/extractor/writer_spec.rb'
|
1236
1229
|
- 'spec/lib/apipie/param_description_spec.rb'
|
1237
1230
|
|
1238
|
-
# Offense count:
|
1231
|
+
# Offense count: 6
|
1239
1232
|
# Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
|
1240
1233
|
RSpec/VerifiedDoubles:
|
1241
1234
|
Exclude:
|
1242
1235
|
- 'spec/lib/apipie/apipies_controller_spec.rb'
|
1236
|
+
- 'spec/lib/apipie/extractor/recorder_spec.rb'
|
1243
1237
|
- 'spec/lib/apipie/extractor/writer_spec.rb'
|
1244
1238
|
- 'spec/lib/validators/array_validator_spec.rb'
|
1245
|
-
- 'spec/lib/apipie/extractor/recorder_spec.rb'
|
1246
1239
|
|
1247
1240
|
# Offense count: 1
|
1248
1241
|
RSpec/VoidExpect:
|
@@ -1266,6 +1259,7 @@ Rails/Delegate:
|
|
1266
1259
|
- 'lib/apipie/response_description_adapter.rb'
|
1267
1260
|
|
1268
1261
|
# Offense count: 24
|
1262
|
+
# This cop supports safe autocorrection (--autocorrect).
|
1269
1263
|
# Configuration parameters: EnforcedStyle.
|
1270
1264
|
# SupportedStyles: slashes, arguments
|
1271
1265
|
Rails/FilePath:
|
@@ -1455,7 +1449,7 @@ Style/ClassCheck:
|
|
1455
1449
|
- 'lib/apipie/validator.rb'
|
1456
1450
|
|
1457
1451
|
# Offense count: 2
|
1458
|
-
# This cop supports
|
1452
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
1459
1453
|
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
1460
1454
|
# AllowedMethods: ==, equal?, eql?
|
1461
1455
|
Style/ClassEqualityComparison:
|
@@ -1747,7 +1741,7 @@ Style/ParallelAssignment:
|
|
1747
1741
|
- 'lib/apipie/extractor.rb'
|
1748
1742
|
- 'lib/apipie/extractor/recorder.rb'
|
1749
1743
|
|
1750
|
-
# Offense count:
|
1744
|
+
# Offense count: 8
|
1751
1745
|
# This cop supports safe autocorrection (--autocorrect).
|
1752
1746
|
# Configuration parameters: PreferredDelimiters.
|
1753
1747
|
Style/PercentLiteralDelimiters:
|
@@ -1826,7 +1820,7 @@ Style/RedundantPercentQ:
|
|
1826
1820
|
Exclude:
|
1827
1821
|
- 'apipie-rails.gemspec'
|
1828
1822
|
|
1829
|
-
# Offense count:
|
1823
|
+
# Offense count: 29
|
1830
1824
|
# This cop supports safe autocorrection (--autocorrect).
|
1831
1825
|
# Configuration parameters: AllowMultipleReturnValues.
|
1832
1826
|
Style/RedundantReturn:
|
@@ -1927,7 +1921,7 @@ Style/StringConcatenation:
|
|
1927
1921
|
- 'lib/apipie/application.rb'
|
1928
1922
|
- 'lib/apipie/extractor/writer.rb'
|
1929
1923
|
|
1930
|
-
# Offense count:
|
1924
|
+
# Offense count: 1214
|
1931
1925
|
# This cop supports safe autocorrection (--autocorrect).
|
1932
1926
|
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
1933
1927
|
# SupportedStyles: single_quotes, double_quotes
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,28 @@
|
|
1
1
|
Changelog
|
2
2
|
===========
|
3
3
|
|
4
|
+
## [v1.4.0](https://github.com/Apipie/apipie-rails/tree/v1.4.0) (2024-05-30)
|
5
|
+
[Full Changelog](https://github.com/Apipie/apipie-rails/compare/v1.3.0...v1.4.0)
|
6
|
+
* Add Ruby 3.3.0 to CI build matrix (#906) Masato Nakamura
|
7
|
+
* Fix rubocop CI (#910) (Masato Nakamura)
|
8
|
+
* Add metadata for rubygems.org and use https URLs (#909) (Masato Nakamura)
|
9
|
+
* Bump GHA actions/checkout to be on node20 by default (#911) (Masato Nakamura)
|
10
|
+
* Convert readme to markdown (#920) (Panos Dalitsouris)
|
11
|
+
* Fix typos, Found via `codespell` (#921) (Kian-Meng Ang)
|
12
|
+
* Bump ruby versions on test jobs (#927) (Masato Nakamura)
|
13
|
+
* Support for Ruby 3.4.0-preview1 (#929) (Masato Nakamura)
|
14
|
+
* Add "blank allowed" message to api doc (#926) (Peko)
|
15
|
+
* Custom headers responses (#924) (Panos Dalitsouris)
|
16
|
+
|
17
|
+
## [v1.3.0](https://github.com/Apipie/apipie-rails/tree/v1.3.0) (2023-12-19)
|
18
|
+
[Full Changelog](https://github.com/Apipie/apipie-rails/compare/v1.2.3...v1.3.0)
|
19
|
+
* rubocop fixes ([#897](https://github.com/Apipie/apipie-rails/pull/897)) (Mathieu Jobin)
|
20
|
+
* Fix usage of deprecated Rack::File in Rack 3.0 ([#896](https://github.com/Apipie/apipie-rails/pull/896)) (James Dean Shepherd)
|
21
|
+
* add rails 7.1 to the build matrix ([#898](https://github.com/Apipie/apipie-rails/pull/898)) (Mathieu Jobin)
|
22
|
+
* super small typo fix ([#900](https://github.com/Apipie/apipie-rails/pull/900)) (Eric Pugh)
|
23
|
+
* support for property example ([#901](https://github.com/Apipie/apipie-rails/pull/901)) (Chien-Wei Huang (Michael))
|
24
|
+
* Use array items type from validator ([#904](https://github.com/Apipie/apipie-rails/pull/)) (Panos Dalitsouris)
|
25
|
+
|
4
26
|
## [v1.2.3](https://github.com/Apipie/apipie-rails/tree/v1.2.3) (2023-10-11)
|
5
27
|
[Full Changelog](https://github.com/Apipie/apipie-rails/compare/v1.2.2...v1.2.3)
|
6
28
|
* Fix param: Consider default_value: nil as valid config ([#894](https://github.com/Apipie/apipie-rails/pull/894)) (davidwessman)
|
data/Gemfile
CHANGED
@@ -5,9 +5,8 @@ source 'https://rubygems.org'
|
|
5
5
|
gemspec path: '.'
|
6
6
|
|
7
7
|
# use ENV vars, with default value as fallback for local setup
|
8
|
-
|
9
|
-
gem '
|
10
|
-
gem 'activesupport', "~> #{ENV['RAILS_VERSION'] || '7.0'}.0"
|
8
|
+
gem 'actionpack', "~> #{ENV['RAILS_VERSION'] || '7.1'}.0"
|
9
|
+
gem 'activesupport', "~> #{ENV['RAILS_VERSION'] || '7.1'}.0"
|
11
10
|
|
12
11
|
gem 'mime-types' # , '~> 3.0'
|
13
12
|
gem 'rails-controller-testing'
|