apipie-rails 0.9.4 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +8 -14
- data/.rubocop_todo.yml +102 -213
- data/CHANGELOG.md +17 -6
- data/README.rst +12 -12
- data/app/controllers/apipie/apipies_controller.rb +4 -4
- data/lib/apipie/apipie_module.rb +4 -4
- data/lib/apipie/application.rb +70 -54
- data/lib/apipie/configuration.rb +19 -26
- data/lib/apipie/dsl_definition.rb +4 -5
- data/lib/apipie/extractor/collector.rb +2 -2
- data/lib/apipie/extractor.rb +1 -1
- data/lib/apipie/generator/config.rb +12 -0
- data/lib/apipie/generator/swagger/computed_interface_id.rb +23 -0
- data/lib/apipie/generator/swagger/config.rb +78 -0
- data/lib/apipie/generator/swagger/context.rb +12 -1
- data/lib/apipie/generator/swagger/method_description/api_decorator.rb +20 -0
- data/lib/apipie/generator/swagger/method_description/api_schema_service.rb +86 -0
- data/lib/apipie/generator/swagger/method_description/decorator.rb +22 -0
- data/lib/apipie/generator/swagger/method_description/parameters_service.rb +139 -0
- data/lib/apipie/generator/swagger/method_description/response_schema_service.rb +46 -0
- data/lib/apipie/generator/swagger/method_description/response_service.rb +58 -0
- data/lib/apipie/generator/swagger/method_description.rb +2 -0
- data/lib/apipie/generator/swagger/operation_id.rb +1 -1
- data/lib/apipie/generator/swagger/param_description/builder.rb +4 -4
- data/lib/apipie/generator/swagger/param_description/composite.rb +9 -1
- data/lib/apipie/generator/swagger/param_description/in.rb +1 -1
- data/lib/apipie/generator/swagger/param_description/path_params_composite.rb +61 -0
- data/lib/apipie/generator/swagger/param_description/referenced_composite.rb +36 -0
- data/lib/apipie/generator/swagger/param_description/type.rb +9 -2
- data/lib/apipie/generator/swagger/path_decorator.rb +36 -0
- data/lib/apipie/generator/swagger/referenced_definitions.rb +17 -0
- data/lib/apipie/generator/swagger/resource_description_collection.rb +30 -0
- data/lib/apipie/generator/swagger/resource_description_composite.rb +56 -0
- data/lib/apipie/generator/swagger/schema.rb +63 -0
- data/lib/apipie/generator/swagger/type_extractor.rb +0 -19
- data/lib/apipie/generator/swagger/warning.rb +3 -6
- data/lib/apipie/generator/swagger/warning_writer.rb +7 -1
- data/lib/apipie/method_description.rb +4 -2
- data/lib/apipie/param_description.rb +4 -2
- data/lib/apipie/resource_description.rb +1 -1
- data/lib/apipie/swagger_generator.rb +27 -551
- data/lib/apipie/validator.rb +7 -3
- data/lib/apipie/version.rb +1 -1
- data/lib/apipie-rails.rb +17 -0
- data/lib/tasks/apipie.rake +15 -10
- data/spec/controllers/api/v2/nested/resources_controller_spec.rb +2 -2
- data/spec/controllers/pets_controller_spec.rb +10 -16
- data/spec/controllers/users_controller_spec.rb +2 -2
- data/spec/dummy/app/controllers/pets_controller.rb +4 -4
- data/spec/dummy/app/controllers/pets_using_self_describing_classes_controller.rb +2 -2
- data/spec/dummy/app/controllers/twitter_example_controller.rb +2 -2
- data/spec/dummy/app/controllers/users_controller.rb +5 -5
- data/spec/lib/apipie/application_spec.rb +16 -7
- data/spec/lib/apipie/configuration_spec.rb +15 -0
- data/spec/lib/apipie/generator/swagger/config_spec.rb +19 -0
- data/spec/lib/apipie/generator/swagger/context_spec.rb +22 -2
- data/spec/lib/apipie/generator/swagger/method_description/api_schema_service_spec.rb +106 -0
- data/spec/lib/apipie/generator/swagger/method_description/response_schema_service_spec.rb +105 -0
- data/spec/lib/apipie/generator/swagger/param_description/builder_spec.rb +1 -1
- data/spec/lib/apipie/generator/swagger/param_description/composite_spec.rb +2 -2
- data/spec/lib/apipie/generator/swagger/param_description/type_spec.rb +7 -7
- data/spec/lib/apipie/generator/swagger/path_decorator_spec.rb +57 -0
- data/spec/lib/apipie/generator/swagger/referenced_definitions_spec.rb +35 -0
- data/spec/lib/apipie/generator/swagger/resource_description_composite_spec.rb +37 -0
- data/spec/lib/apipie/generator/swagger/resource_descriptions_collection_spec.rb +57 -0
- data/spec/lib/apipie/generator/swagger/schema_spec.rb +89 -0
- data/spec/lib/apipie/generator/swagger/type_extractor_spec.rb +0 -43
- data/spec/lib/apipie/generator/swagger/warning_spec.rb +1 -1
- data/spec/lib/apipie/generator/swagger/warning_writer_spec.rb +19 -7
- data/spec/lib/apipie/method_description_spec.rb +101 -66
- data/spec/lib/apipie/param_description_spec.rb +209 -49
- data/spec/lib/apipie/param_group_spec.rb +1 -0
- data/spec/lib/apipie/resource_description_spec.rb +1 -1
- data/spec/lib/apipie/swagger_generator_spec.rb +94 -0
- data/spec/lib/apipie/validator_spec.rb +47 -11
- data/spec/lib/swagger/rake_swagger_spec.rb +4 -4
- data/spec/lib/swagger/swagger_dsl_spec.rb +7 -7
- data/spec/lib/validators/array_validator_spec.rb +1 -1
- metadata +28 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 822d52cddc54c458cc7449d9f881a68ee6766811d740cbc0a6d717f4760b8896
|
4
|
+
data.tar.gz: 37a6bd59c3e1fac91dbcb8ef34078caa28c19b9e27bcad872d70796096dfc67f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a16332ce330bd90cc3a12bc57b5904bc7e66cd0f21dd66fd497903a139fb826c7e4e796fbdf440bb17c48427755d3cd66e548660e3e8a4a549dd8b97f5205db4
|
7
|
+
data.tar.gz: 1ac7735265214806b2beb8d7414c18915a8de995bf55339c93124f5247833284a30d566517ce71266718da3a237769d48c1a02bc1f6d5b11a893908bcc33f4d8
|
data/.rubocop.yml
CHANGED
@@ -38,6 +38,7 @@ Metrics/ClassLength:
|
|
38
38
|
- lib/apipie/extractor/writer.rb
|
39
39
|
- lib/apipie/application.rb
|
40
40
|
- lib/apipie/param_description.rb
|
41
|
+
- lib/apipie/method_description.rb
|
41
42
|
- lib/apipie/swagger_generator.rb
|
42
43
|
- spec/dummy/app/controllers/pets_controller.rb
|
43
44
|
- spec/dummy/app/controllers/twitter_example_controller.rb
|
@@ -48,6 +49,7 @@ Metrics/BlockLength:
|
|
48
49
|
Exclude:
|
49
50
|
- app/controllers/apipie/apipies_controller.rb
|
50
51
|
- lib/apipie/generator/swagger/param_description/composite.rb
|
52
|
+
- lib/apipie/generator/swagger/param_description/path_params_composite.rb
|
51
53
|
- lib/tasks/apipie.rake
|
52
54
|
- lib/apipie/swagger_generator.rb
|
53
55
|
|
@@ -65,6 +67,10 @@ Style/HashSyntax:
|
|
65
67
|
EnforcedStyle: no_mixed_keys
|
66
68
|
EnforcedShorthandSyntax: never # consistent
|
67
69
|
|
70
|
+
Metrics/ParameterLists:
|
71
|
+
Exclude:
|
72
|
+
- 'lib/apipie/generator/swagger/context.rb'
|
73
|
+
|
68
74
|
Style/Documentation:
|
69
75
|
Exclude:
|
70
76
|
- 'app/controllers/apipie/apipies_controller.rb'
|
@@ -81,20 +87,7 @@ Style/Documentation:
|
|
81
87
|
- 'lib/apipie/extractor/recorder.rb'
|
82
88
|
- 'lib/apipie/extractor/writer.rb'
|
83
89
|
- 'lib/apipie/generator/generator.rb'
|
84
|
-
- 'lib/apipie/generator/swagger
|
85
|
-
- 'lib/apipie/generator/swagger/operation_id.rb'
|
86
|
-
- 'lib/apipie/generator/swagger/param_description.rb'
|
87
|
-
- 'lib/apipie/generator/swagger/param_description/builder.rb'
|
88
|
-
- 'lib/apipie/generator/swagger/param_description/composite.rb'
|
89
|
-
- 'lib/apipie/generator/swagger/param_description/description.rb'
|
90
|
-
- 'lib/apipie/generator/swagger/param_description/in.rb'
|
91
|
-
- 'lib/apipie/generator/swagger/param_description/name.rb'
|
92
|
-
- 'lib/apipie/generator/swagger/param_description/type.rb'
|
93
|
-
- 'lib/apipie/generator/swagger/swagger.rb'
|
94
|
-
- 'lib/apipie/generator/swagger/type.rb'
|
95
|
-
- 'lib/apipie/generator/swagger/type_extractor.rb'
|
96
|
-
- 'lib/apipie/generator/swagger/warning.rb'
|
97
|
-
- 'lib/apipie/generator/swagger/warning_writer.rb'
|
90
|
+
- 'lib/apipie/generator/swagger/**/*'
|
98
91
|
- 'lib/apipie/helpers.rb'
|
99
92
|
- 'lib/apipie/markup.rb'
|
100
93
|
- 'lib/apipie/method_description.rb'
|
@@ -106,6 +99,7 @@ Style/Documentation:
|
|
106
99
|
- 'lib/apipie/routes_formatter.rb'
|
107
100
|
- 'lib/apipie/routing.rb'
|
108
101
|
- 'lib/apipie/rspec/response_validation_helper.rb'
|
102
|
+
- 'lib/apipie/swagger_generator.rb'
|
109
103
|
- 'lib/apipie/see_description.rb'
|
110
104
|
- 'lib/apipie/static_dispatcher.rb'
|
111
105
|
- 'lib/apipie/tag_list_description.rb'
|