apipie-rails 0.0.16 → 0.1.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.
- data/.gitignore +4 -0
- data/.travis.yml +7 -2
- data/CHANGELOG.md +97 -0
- data/Gemfile +1 -1
- data/Gemfile.rails30 +5 -0
- data/Gemfile.rails32 +5 -0
- data/Gemfile.rails40 +5 -0
- data/Gemfile.rails41 +5 -0
- data/README.rst +405 -25
- data/apipie-rails.gemspec +1 -1
- data/app/controllers/apipie/apipies_controller.rb +20 -1
- data/app/helpers/apipie_helper.rb +9 -0
- data/app/views/apipie/apipies/_metadata.erb +1 -0
- data/app/views/apipie/apipies/_method_detail.erb +46 -0
- data/app/views/apipie/apipies/_params.html.erb +12 -0
- data/app/views/apipie/apipies/_params_plain.html.erb +4 -0
- data/app/views/apipie/apipies/apipie_404.html.erb +3 -1
- data/app/views/apipie/apipies/apipie_checksum.json.erb +1 -0
- data/app/views/apipie/apipies/method.html.erb +3 -39
- data/app/views/apipie/apipies/plain.html.erb +1 -0
- data/app/views/apipie/apipies/resource.html.erb +8 -39
- data/app/views/apipie/apipies/static.html.erb +1 -0
- data/lib/apipie/application.rb +52 -31
- data/lib/apipie/configuration.rb +25 -2
- data/lib/apipie/dsl_definition.rb +342 -155
- data/lib/apipie/error_description.rb +22 -10
- data/lib/apipie/extractor/collector.rb +2 -2
- data/lib/apipie/extractor/recorder.rb +6 -3
- data/lib/apipie/extractor/writer.rb +10 -4
- data/lib/apipie/extractor.rb +5 -2
- data/lib/apipie/markup.rb +5 -1
- data/lib/apipie/method_description.rb +51 -34
- data/lib/apipie/middleware/checksum_in_headers.rb +35 -0
- data/lib/apipie/param_description.rb +138 -18
- data/lib/apipie/railtie.rb +1 -1
- data/lib/apipie/resource_description.rb +13 -8
- data/lib/apipie/routing.rb +1 -0
- data/lib/apipie/see_description.rb +39 -0
- data/lib/apipie/static_dispatcher.rb +11 -2
- data/lib/apipie/validator.rb +124 -18
- data/lib/apipie/version.rb +1 -1
- data/lib/apipie-rails.rb +2 -1
- data/lib/generators/apipie/views_generator.rb +11 -0
- data/lib/tasks/apipie.rake +28 -2
- data/spec/controllers/api/v2/nested/resources_controller_spec.rb +11 -0
- data/spec/controllers/apipies_controller_spec.rb +16 -0
- data/spec/controllers/concerns_controller_spec.rb +42 -0
- data/spec/controllers/users_controller_spec.rb +196 -47
- data/spec/dummy/app/controllers/api/v1/architectures_controller.rb +14 -3
- data/spec/dummy/app/controllers/api/v2/architectures_controller.rb +1 -3
- data/spec/dummy/app/controllers/api/v2/nested/architectures_controller.rb +32 -0
- data/spec/dummy/app/controllers/api/v2/nested/resources_controller.rb +33 -0
- data/spec/dummy/app/controllers/concerns/sample_controller.rb +41 -0
- data/spec/dummy/app/controllers/concerns_controller.rb +8 -0
- data/spec/dummy/app/controllers/users_controller.rb +51 -7
- data/spec/dummy/config/routes.rb +2 -1
- data/spec/dummy/doc/users/desc_from_file.md +1 -0
- data/spec/lib/application_spec.rb +49 -0
- data/spec/lib/method_description_spec.rb +28 -5
- data/spec/lib/param_description_spec.rb +216 -6
- data/spec/lib/param_group_spec.rb +45 -0
- data/spec/lib/rake_spec.rb +68 -0
- data/spec/lib/resource_description_spec.rb +27 -7
- data/spec/lib/validator_spec.rb +55 -0
- data/spec/spec_helper.rb +2 -1
- data/spec/support/rake.rb +21 -0
- metadata +90 -21
- data/.rvmrc +0 -1
- data/CHANGELOG +0 -16
- data/Gemfile.lock +0 -122
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
===========
|
|
2
|
+
Changelog
|
|
3
|
+
===========
|
|
4
|
+
|
|
5
|
+
v0.1.0
|
|
6
|
+
------
|
|
7
|
+
|
|
8
|
+
* middleware for computing Apipie checksum for [dynamic bindings](https://github.com/Apipie/apipie-bindings) [#215](https://github.com/Apipie/apipie-rails/pull/215) [@mbacovsky][]
|
|
9
|
+
* `api_base_url` inherited properly [#214](https://github.com/Apipie/apipie-rails/pull/214) [@mbacovsky][]
|
|
10
|
+
* ability to hide specific parameters [#208](https://github.com/Apipie/apipie-rails/pull/208) [@nathanhoel][]
|
|
11
|
+
* fix for SafeYAML compatibility [#207](https://github.com/Apipie/apipie-rails/pull/207) [@pivotalshiny][]
|
|
12
|
+
* option to show all examples in the documentation [#203](https://github.com/Apipie/apipie-rails/pull/203) [@pivotalshiny][]
|
|
13
|
+
* support for array of hashes validation [#189](https://github.com/Apipie/apipie-rails/pull/189) [@mtparet][]
|
|
14
|
+
* support for saving the values based on documentation into `@api_params` variable [#188](https://github.com/Apipie/apipie-rails/pull/188) [@mtparet][]
|
|
15
|
+
* support for json generated from rake task `rake apipie:static_json` [#186](https://github.com/Apipie/apipie-rails/pull/186) [@mtparet][]
|
|
16
|
+
* fix `undefined method 'has_key?' for nil:NilClass` when validating Hash against non-hash value [#185](https://github.com/Apipie/apipie-rails/pull/185) [@mtparet][]
|
|
17
|
+
* fix NoMethorError when validating Hash against non-hash value [#183](https://github.com/Apipie/apipie-rails/pull/183) [@nathanhoel][]
|
|
18
|
+
* support for metadata for params [#181](https://github.com/Apipie/apipie-rails/pull/181) [@tstrachota][]
|
|
19
|
+
* fix camelization of class names [#170](https://github.com/Apipie/apipie-rails/pull/170) [@yonpols][]
|
|
20
|
+
* new array class validator [#169](https://github.com/Apipie/apipie-rails/pull/169) [@mkrajewski][]
|
|
21
|
+
|
|
22
|
+
v0.0.24
|
|
23
|
+
-------
|
|
24
|
+
|
|
25
|
+
* fix DOS vulnerability for running in production without use_cache
|
|
26
|
+
* ability to load descriptions from external files
|
|
27
|
+
* improved examples extractor
|
|
28
|
+
* fixed deprecation warnings in Rails 4
|
|
29
|
+
* using StandardError instead of Exception for errors
|
|
30
|
+
|
|
31
|
+
v0.0.23
|
|
32
|
+
-------
|
|
33
|
+
|
|
34
|
+
* fix exceptions on unknown validator
|
|
35
|
+
* fix concerns substitution in parameters
|
|
36
|
+
* possibility to authenticate the API doc
|
|
37
|
+
* support for array in api_controllers_matcher
|
|
38
|
+
|
|
39
|
+
v0.0.22
|
|
40
|
+
-------
|
|
41
|
+
|
|
42
|
+
* fix "named_resources" option
|
|
43
|
+
* fix generating static files when concerns used
|
|
44
|
+
|
|
45
|
+
v0.0.21
|
|
46
|
+
-------
|
|
47
|
+
|
|
48
|
+
* fix RDoc 4.0 compatibility issue
|
|
49
|
+
* ``validate_value`` and ``validate_presence`` options for better
|
|
50
|
+
validation granularity
|
|
51
|
+
|
|
52
|
+
v0.0.20
|
|
53
|
+
-------
|
|
54
|
+
|
|
55
|
+
* namespaced resources - prevent collisions when one resource defined
|
|
56
|
+
in more modules
|
|
57
|
+
* ``Apipie::DSL::Concern`` for being able to use the DSL in module
|
|
58
|
+
that is included into controllers
|
|
59
|
+
|
|
60
|
+
v0.0.19
|
|
61
|
+
-------
|
|
62
|
+
|
|
63
|
+
* fix examples recording when resource_id is set
|
|
64
|
+
* use safe_yaml for loading examples file when available
|
|
65
|
+
|
|
66
|
+
v0.0.18
|
|
67
|
+
-------
|
|
68
|
+
|
|
69
|
+
* ``param_group`` and ``def_param_group`` keywords
|
|
70
|
+
* ``:action_aware`` options for reusing param groups for create/update actions
|
|
71
|
+
|
|
72
|
+
v0.0.17
|
|
73
|
+
-------
|
|
74
|
+
|
|
75
|
+
* support for multiple see links at action and ability to provide
|
|
76
|
+
description of see links
|
|
77
|
+
|
|
78
|
+
v0.0.16
|
|
79
|
+
-------
|
|
80
|
+
|
|
81
|
+
* Fix getting started being rendered even when documentation was available
|
|
82
|
+
|
|
83
|
+
v0.0.15
|
|
84
|
+
-------
|
|
85
|
+
|
|
86
|
+
* Fix case when there is no documentation yet: with link to how to
|
|
87
|
+
start
|
|
88
|
+
* Fix handling bad requests when cache is on
|
|
89
|
+
* Fix params extractor in case there is already some documentation
|
|
90
|
+
|
|
91
|
+
[@mbacovsky]: https://github.com/mbacovsky
|
|
92
|
+
[@tstrachota]: https://github.com/tstrachota
|
|
93
|
+
[@nathanhoel]: https://github.com/nathanhoel
|
|
94
|
+
[@pivotalshiny]: https://github.com/pivotalshiny
|
|
95
|
+
[@mtparet]: https://github.com/mtparet
|
|
96
|
+
[@yonpols]: https://github.com/yonpols
|
|
97
|
+
[@mkrajewski]: https://github.com/mkrajewski
|
data/Gemfile
CHANGED
data/Gemfile.rails30
ADDED
data/Gemfile.rails32
ADDED
data/Gemfile.rails40
ADDED