Commit Graph

218 Commits

Author SHA1 Message Date
Patrick Oscity a4190cf2d1
Grape 2.2.0 compatibility (#940)
* Run `rubocop -a`

* Update changelog

* Run CI against grape 2.1.x and 2.2.x

* Copy formatter and content type defaults from grape

* Use matrix to reduce duplication in CI workflow
2024-09-21 05:21:46 -04:00
Eric Proulx 707b00b91b
Use `route.namespace` instead instance_variable_get(@options) (#931)
Rename `route_instance_variable_equals?` to `route_namespace_equals?`
Refactor route_path_start_with? and route_namespace_equals? with Enumerator instead of static Arrays
Refactor determine_namespaced_routes in positive logic (select over reject)
2024-06-11 01:33:41 +02:00
Andrei Subbota 0b969bc25d
Avoid unnecessary `add_setup` calls (#926) 2024-04-30 17:28:46 +02:00
David Chandek-Stark ccdc2dd082
Fixes (restores) route ordering (#859)
* Fixes order

* Updates CHANGELOG
Satisfies rubocop

* I believe the removed test is not supported by grape and should not
be a blocker to making the changes in this PR.

While there does not appear to be a grape test with the same setup,
the spec at e3451c892a/spec/grape/api_spec.rb (L1025-L1045)
suggests that mounts do not overwrite.

---------

Co-authored-by: peter scholz <pscholz.le@gmail.com>
2024-03-03 16:52:36 +01:00
Halil Sen 013d2dacd9
Fixes the regexp used for parsing routes (#844)
* Fix: incorrect regexp character set definition

In a character set, vertical bars `|` are treated as a proper character and not as an OR.

They are not needed since character set applies the OR logic automatically.

* Update CHANGELOG.md

Co-authored-by: peter scholz <pscholz.le@gmail.com>
2022-07-26 10:07:57 +02:00
peter scholz 8d245e5137
Fixes #809: supports UTF8 route names. (#811)
- adds changelog entry
2020-10-09 22:28:14 +02:00
peter scholz e1261f8627
Fixes behaviour after grape upgrade to 1.4.0. (#801)
- adds CHANGELOG entry
2020-07-14 08:40:22 +02:00
peter scholz ff5b610206
Points to grape-swagger-entity fix. (#799)
- allows grape head to fails ... for the moment
2020-06-30 10:12:52 +02:00
Gwénaël Rault 445d2d471d Deeply nested objects (#752)
* Depply nested objects

* Simple hash syntax edit

* Nested objects are not necessary arrays

* fix points test

* Fix test services

* Doesn't require to delete hash or array properties

* Edit nested logic

* Add vehicle test

* Change parameter level is endpoint job

* Array body shouldn't lost array type

* no more parser role

* array of array to array of string

* move format data

* fix formdata return

* Moved params_parser role spec

* Move endpoint spec

* Revert "Add vehicle test"

This reverts commit e5ba63ba26.

* remove redundant interpolation
2019-08-06 14:22:14 +02:00
Nicolas Klein 2457215336 Adds support for grape >= 1.2 (#717)
* Adds support for grape >= 1.2


Makes swagger backwards-compatible again


Adds a test that covers re-mounting with configuration


Describes changes on this PR


Removes custom branch from build process

* Upgrades Rubocop and autofixes indentation

* Locks rubocop version to 0.60

* Rollbacks version bump

* Removes HEAD from allowed failure
2018-10-29 17:03:59 +01:00
peter scholz 824c64d092
updates rubocop to 0.59.0 (#703) 2018-09-10 13:03:01 +02:00
peter scholz d6bed95233
makes rubocop 0.52 happy (#658) 2017-12-13 09:21:09 +01:00
peter scholz 8c3fb898a4
updates dependencies (#645) 2017-11-03 22:40:09 +01:00
Anton Dieterle 89166b0390 Fix order of mounts with overrides (#631) 2017-09-27 01:04:51 +02:00
Wojciech Kocjan 7d871ae4a1 Fix mounting APIs in route_param namespaces (#634)
* Fix mounting APIs in route_param namespaces

* Added missing tests, based on code from

https://github.com/ruby-grape/grape-swagger/pull/543 by @milgner

Applied on top of latest master

* Added changelog

* Fix CHANGELOG.md

* Cleanup rubocop offences related to this change

* Fix rubocop version

* Re-added * Your contribution here to CHANGELOG.md
2017-09-27 00:53:38 +02:00
Dmitry Sinelnikov fa9cc71523 Fix swagger to show root path (#605) (#616) 2017-06-16 15:08:32 +02:00
peter scholz 1ede5c4f7f prepare 0.27.0 (#598)
- updates dependencies
- makes rubocop 0.48 happy
2017-03-28 11:15:33 +02:00
peter scholz 2df7dbeaf1 issue #590: fixes rubocop offences (#595) 2017-03-08 09:32:31 +01:00
peter scholz ab12328257 increases code coverage (#570)
- removbes dead code
- adds changelog entry
- corrects coveralls bagde
2017-01-15 23:54:02 +01:00
peter scholz 51d4ff6622 issue#566: removes markdown (#567)
- updates README
- updates UPGRADING
- adds changelog entry
- cleans up gemfile
2017-01-14 16:49:51 +01:00
peter scholz 6c5e386a32 Version Cascading including dependency updates (#558)
* Grape version cascading (#27)
- Add support for grape version cascading
- make rubocop happy, fix test
- fix test failure for grape lower than 0.17
- refactors getting version from route

* updates dependencies
- drops grape <0.16.2 support, including code only for grape <0.16.2
- adds ruby 2.4.0 support
- adds grape 0.19.0 support
- adds changelog entry
- updates version matrix
- adapts rubocop todo
2016-12-27 13:49:29 +01:00
peter scholz 5cdcaaa674 Issue 508 bug in combine routes (#529)
* - Simple dirty patch to make it work

- CHANGELOG changed

- Spec added

- Fixing specs

- Fixing specs

* makes rubocop happy
- updates changelog
2016-11-16 13:41:47 +00:00
peter scholz 57947d308e accepts string as entity (#527)
- adds changelog entry
- requires min version of rubocop
2016-10-31 12:14:08 +01:00
Kevin Liddle e755999cfe Combine namespaces with their mount_path to allow APIs with specified mount_paths (#505)
i.e. `mount SomeAPI => '/some_api'`
2016-09-22 11:31:13 +02:00
peter scholz fdbe8e4f0f adds Rake task to get and validate OAPI documentation (#500)
- updates compatibility matrix
- adds changelog entry
2016-09-08 17:32:09 +02:00
Aurel Branzeanu a9d36f9f85 Swagger UI endpoint authorization. (#493) 2016-09-08 16:58:04 +02:00
rayko 4e2c2354ce Fixed camel case issue #457 (#458)
* Fixed camel case issue https://github.com/ruby-grape/grape-swagger/issues/457

* Description of fixed issue in CHANGELOG.md

* Fixing api_swagger_v2_detail_spec.rb with updated expectation
2016-06-15 17:01:02 -04:00
Sergey Nartimov d4cb9db086 Remove extra dependency
`awesome_print` gem is not used in the code and should not be a runtime
dependency.

Initially, it was added as a development dependency in
e406abfe3c. It was used to output debug
information in specs.

But later, it was changed to be a runtime dependency in
05a0085155 for no particular reason.
2016-05-11 09:07:29 +03:00
Kirill Zaitsev f4a0c15687 Move model parsing logic outside grape-swagger 2016-05-10 21:59:15 +03:00
dblock 0d5702ee3c Support for Grape 0.16.0. Closes #407. 2016-05-06 17:44:21 -04:00
peter scholz 3c5a7361ea set default `type: Integer` and `required: true` for path params
* set default `type: Integer` and `required: true` for path params

* Update CHANGELOG.md
2016-04-03 00:35:55 +02:00
Peter Scholz 18401c8ce1 some more parameter corrections 2016-04-01 09:28:51 +02:00
peter scholz 8b9825d0e9 Update CHANGELOG.md 2016-03-17 11:20:34 +01:00
Peter Scholz 3a97ec1524 same refactoring 2016-03-16 12:13:44 +01:00
Peter Scholz 55829739eb adds extensions support 2016-03-13 15:04:27 +01:00
Peter Scholz 8f944563ae modularize data type 2016-03-13 15:04:27 +01:00
peter scholz 0afb3ed422 Update api_swagger_v2_format-content_type_spec.rb
removes pry

runs under 2.3

updates gems, corrects parameter, which is in array, make rubocop happy

fixes jruby build

changes for TravisCI
2016-03-13 15:04:27 +01:00
Peter Scholz 75869e3702 documents produces of an end-point 2016-03-13 15:04:27 +01:00
Peter Scholz 78786a83aa decreases rubocop warnings 2016-01-18 09:13:11 +01:00
Peter Scholz 425af5a40c readds `details` to swagger 2015-12-20 21:29:46 +01:00
Peter Scholz eab66e0479 updates grape, corrects creation of definitions 2015-12-09 13:54:53 +01:00
LeFnord 99c3d820c2 readds default api_version, cause it is required 2015-10-22 19:03:59 +02:00
LeFnord efae683fd1 sets `api_version` from `version` if given, else remove it 2015-10-22 18:50:05 +02:00
LeFnord 0e5b07caeb adds support for mounted resources 2015-10-03 15:31:30 +02:00
LeFnord e406abfe3c Update README.md 2015-09-24 19:08:24 +02:00
LeFnord 6e050fb110 refactoring ... 2015-08-27 02:50:37 +02:00
LeFnord f6539473c3 upgrade to swagger2.0 spec 2015-08-26 23:02:34 +02:00
dblock 2d8acdac5a Upgraded RuboCop to 0.33.0. 2015-08-19 12:18:27 -04:00
Lasse Skindstad Ebert 0ccb330234 Fixes paths that starts with mount path followed by dash 2015-06-22 20:43:27 +02:00
Lasse Skindstad Ebert 362d6939b2 Fixed bug: Would hide docs for endpoints
When docs are hidden with `hide_documentation_path` and an endpoint's
path begin with the same string as the docs mount path, the endpoint is
hidden.

This fixes it
2015-06-19 14:00:30 +02:00