Commit Graph

659 Commits

Author SHA1 Message Date
peter scholz 57947d308e accepts string as entity (#527)
- adds changelog entry
- requires min version of rubocop
2016-10-31 12:14:08 +01:00
peter scholz 7d405ff714 use route tags for global tag set (#524)
* minor adoptions on README

* build global tag set from route tags
- adds changelog entry
- adds note in UPGRADING
2016-10-23 19:45:33 +02:00
Jordan Brown 14364e3c65 Allow specifying custom tags at the route level (#523)
The current logic to determine a route's set of tags is based solely on the route, which works in most cases, but isn't flexible when you want to override the tags.

The situation that led me here was the following setup:

```
prefix 'locations/:id'

resource :employees do
  desc 'Retrieve employees for a given location'

  get '/' do
    ...
  end
end
```

Which grouped the `/locations/:id/employees` under the `locations` namespace. This was undesirable, because almost all of the endpoints in our API are prefixed with `/locations/:id`, which meant that they were all grouped under the `locations` namespace.

Allowing an additional `tags` attribute on the `desc` method solved the issue for me.

```
desc 'Retrieve employees for a given location', tags: ['employees']
```
2016-10-22 22:47:58 +02:00
Wojciech Korzeniowski 7061fd1b75 Response model can have required attributes (#521)
* Response model can have required attributes

* Reorganize implementation

* Fix RuboCop offences

* Last touch of refactor
2016-10-14 11:56:33 +02:00
Sergey A. Glukhov d7b7465a95 fix incorrect data type linking for request params of entity types (#511) 2016-10-13 23:06:03 +02:00
peter scholz 10ed0b8217 additions to #515 (#518) 2016-10-13 00:07:45 +02:00
peter scholz 197103efc6 Removes limit on model names (#515) 2016-10-12 17:31:19 -04:00
texpert c8476c53f7 [ci skip] Update README with 'Swagger-UI is supporting only implicit flow yet'. 2016-10-08 23:01:33 +02:00
Sergey Nartimov 6c481d4d68 Improve README (#514)
Fix some grammar typos.
2016-10-08 20:29:27 +02:00
Anton Chuchkalov 077843d6e7 fix grape-entity repo link (#513) 2016-10-05 23:38:43 +02:00
Aurel Branzeanu e0037fcc02 Use 'token_owner' instead of 'oauth_token' on Swagger UI endpoint authorization. (#510) 2016-10-03 19:49:48 +02:00
peter scholz b719e2dbbc version bump 0.24.0 (#506) 2016-09-23 17:01:37 +02: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
Janos Racz 2ccb32bb5b Added support for set the 'collectionFormat' of arrays (#504) 2016-09-20 17:07:13 +02:00
peter scholz 054c54fdda corrects exposing of inline definitions (#503)
- adds changelog entry
- adds option to set definition name
2016-09-19 17:53:22 +02:00
peter scholz ef1d5cdf76 adds specs for rake tasks (#502)
- make it <0.16.0 compatible
- adds changelog entry
- [scouting] removes non existend examples contexts
2016-09-10 14:35:01 +02:00
peter scholz b4d25d5627 adds getting of specified resource (#501) 2016-09-09 01:58:28 +02:00
Joakim Antman 3e855dd0b6 Include headers when body parameters have been defined (#494) 2016-09-08 21:23:17 +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
Daniel Doubrovkine (dB.) @dblockdotorg 5c8249f49e Use ruby-grape-danger gem. (#497) 2016-09-05 10:56:55 -04:00
Tom Regelink 463b289c51 Allow endpoints to define security requirements (#492) 2016-08-22 18:11:10 +02:00
peter scholz 053713c194 Update CHANGELOG.md
corrects URLs of #419 and #486
2016-08-05 15:20:15 +02:00
LeFnord a34983f11b
version bump v0.23.0 2016-08-05 14:36:37 +02:00
pezholio 45c0956861 Add `ignore_defaults` option (#491)
* Add `ignore_defaults` option

* Update Changelog

* Make Rubocop happy

* Add seperate spec for `ignore_defaults`

* Make tests more specific

* Revert Rubocop-pleasing changes

* Increase max line length
2016-08-04 22:51:47 +02:00
peter scholz 64908af40a makes version settings more clear (#489)
- updates UPGRADES.md
- adds CHANGELOG entry
2016-08-02 01:37:45 +02:00
peter scholz 24f34b111b updates travis matrix (#488) 2016-08-01 08:23:26 -04:00
peter scholz 5bf7a7bfae usese danger 2.1.1 (#487)
- cleans up travis
2016-07-31 20:42:13 -04:00
Daniel Doubrovkine (dB.) @dblockdotorg 224e4f7acf Use an automated PR linter, danger.systems. (#486) 2016-07-30 22:01:25 -04:00
Pablo Bendersky 8775c7c0f6 Added missing . in changelog. (#485) 2016-07-29 23:52:06 +02:00
Pablo Bendersky 30ce26987d added support for nicknamed routes (#483)
* added support for nicknamed routes

* uses let instead of method to instantiate the app

* updated spec to use anon class

* fixed rubocop errors

* Refactor to fix rubocop issues.

* Added entry in Changelog.
2016-07-27 00:30:38 +04:00
Frédéric Rodrigo 43674b762f Fix regex for Array and Multi Type in doc_methods (#479) 2016-07-26 10:32:17 +02:00
peter scholz eb0599fe84 minor correction, refactoring (#478)
- adds changelog entry
2016-07-21 13:15:36 +02:00
Joakim Antman 9dd244bf96 Fixed move_params_to_new to allow name to be defined as a Symbol (#476)
* Fixed move_params_to_new to allow name to be defined as a Symbol

* Fixes for parameter type handling

* All param names as symbols
2016-07-15 11:29:37 +02:00
peter scholz 101d85ad7b version bump v0.22.0 (#473) 2016-07-12 14:13:58 +02:00
Benedict Dodd c393235f97 Allow Security Definitions Objects to be defined (#471)
* Add securityDefinitions to allow Swagger UI to authenticate

* Add usage docs and tests for security_definitions

* Fix Rubocop errors #badben
2016-07-11 12:07:23 +02:00
peter scholz b5f4d1fcd1 Fixes required property for request definitions (#472)
- adds changelog entry
2016-07-10 14:52:00 -04:00
peter scholz 05c52d3f94 request definitions now inline (#468) (#470) 2016-07-07 11:44:07 -04:00
peter scholz 27ff9f4a57 refoctors building definitions for body params (#467)
- adds base spec
- adds changelog entry
2016-07-06 10:25:57 +02:00
peter scholz 756feb5f70 fixes body array params (#464)
- adds chengelog entry
2016-07-04 17:42:28 +02:00
Joakim Antman 60782eab16 Support excluding optional parameters from documentation (#463) 2016-07-03 20:10:22 +02:00
peter scholz 7ea9af34d4 fixes issue by adding extensions to definitions (#461)
- if the given status code was not definied as response
- adds reslease note
2016-06-23 16:59:31 +02:00
Daniel Doubrovkine (dB.) @dblockdotorg 2136ec038b Fix: build. (#460) 2016-06-17 13:56:24 -04:00
TySpring a07385f014 Allow passing of Array with brackets (eg. Array[String], Array[Integer]) (#455) 2016-06-16 07:35:29 -04: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
Andrew Schuster 611572f3cb Include documented Hashes (#454)
* Fix logic for mapping Hash and Array objects to refs

* Add tests to account for documented Hashes and Arrays

* Do not include readOnly params in request definitions

* Test for new documentation behavior

* Update changelog [ci skip]

* Use respond_to? instead of try for earlier compliance

* Use proper url for changelog
2016-06-14 08:12:46 -04:00
scauglog 6ef800cd7c multi type and documentation hash (#444)
* multi type parameter default to first type
when :type and :default are provided in a documenation hash they override grape :type and :default

* rubocop style

* changelog style

* test multi type only if grape >= 0.14

* rubocop style

* test for muli type with grape<0.14
2016-06-10 01:38:00 +02:00
Joakim Antman d3a010dace Fix for tags for path versioned endpoints (#447)
* Test for tags in a versioned endpoint

* Use the version from route when tagging endpoints

* Updated the CHANGELOG
2016-06-08 09:41:47 +02:00
Bugagazavr 87dcdc42b0 Fix specs for https://github.com/ruby-grape/grape-swagger-entity/pull/7 (#451) 2016-06-08 00:56:00 +02:00
Joakim Antman 893e8136cf Order of header parameters (#448)
* Prepend the header params instead of appending them

* Added test for order of the parameters, headers first

* Updated CHANGELOG

* Changelog entry from fixes to features
2016-06-07 23:21:17 +02:00