Commit Graph

173 Commits

Author SHA1 Message Date
Peter Scholz c07a60285f corrects documenting of route parameters 2015-12-18 18:41:50 +01:00
Peter Scholz 12b82c4360 cleans up code 2015-12-17 23:52:30 +01:00
Peter Scholz 9b813a2404 readds model to definitions 2015-12-11 02:35:02 +01:00
Peter Scholz 59b7ad1ef1 re-adds option: hide documentation path 2015-12-10 23:42:37 +01:00
Peter Scholz eab66e0479 updates grape, corrects creation of definitions 2015-12-09 13:54:53 +01:00
Peter Scholz 17e5a785f1 adds scheme setting 2015-12-02 11:23:22 +01:00
LeFnord 5cd0cbf09d adds adding of response headers 2015-12-01 23:48:41 +01:00
LeFnord 748982fc63 minor spec changes 2015-11-07 14:44:35 +01:00
LeFnord f6dc58ecdc adds support for `success` and `failure` keys for desc block 2015-11-05 22:19:03 +01:00
Peter Scholz dbcef5904d minor refactorings 2015-11-05 15:18:43 +01:00
Peter Scholz 0a6c5aa902 respects given entity key of desc block; corrects exposing of type 2015-11-04 14:44:23 +01:00
Peter Scholz e9afa2cbb4 adds array support for nested parameters 2015-11-04 13:51:48 +01:00
LeFnord 3b62dfea6e adds hash support for nested parameters 2015-11-03 22:00:47 +01:00
Carlos García Mujica ff9a7837a5 Permit "x-amazon-apigateway-auth" and "x-amazon-apigateway-integration" to be added with a aws key in the desc 2015-10-30 14:14:44 +01:00
Peter Scholz 0760c232fd removes pry 2015-10-29 12:30:06 +01:00
Peter Scholz 76cf5f2093 renames `action` to `is_array`, to be compatibleto the older version 2015-10-29 09:08:58 +01:00
LeFnord 77046f69fe introduces `action` option 2015-10-28 19:18:38 +01:00
Peter Scholz ebc3a178f0 definitions now camelcase; respects description 2015-10-27 17:45:52 +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 9a4dfe77e3 WIP: swagger2.0, cleanup spec 2015-10-04 20:05:22 +02:00
LeFnord 0e5b07caeb adds support for mounted resources 2015-10-03 15:31:30 +02:00
LeFnord 23031f4c3e WIP: swagger2.0, cleanup spec 2015-09-30 22:59:11 +02:00
Peter Scholz 9186d70b7a WIP: swagger2.0: adds schema to response 2015-09-25 14:15:49 +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
Tobias Bielohlawek 7b9955ea2b Use `detail` option as `notes` value.
This adds support for using the `detail` value defined within a block passed to `desc` as `notes` value exposed in swagger doc.

CAUTION: only works on grape version > 0.10.0
```
$ GRAPE_VERSION=HEAD bundle exec rspec ./spec/default_api_spec.rb:62
```

fixes #212
2015-08-19 10:01:58 +02:00
Tobias Bielohlawek a53ada0765 Remove senseless Hash definition for 'notes'
This line can be deleted, as the next line overwrites the value anyway. Looks like a classic cope&paste typo
2015-08-19 10:00:04 +02:00
Ji Zhou 70428799b8 make api doc `name` param recognizable by `declared` 2015-08-10 11:41:30 +08:00
Matt Olson 24692e7619 Fix for Grape 0.12.0 with :hide_format
* Grape 0.12.0 changed the paths for api endpoints that have a single
  format. See https://github.com/intridea/grape/pull/1001/files
* This change updates the way we reformat the paths for Swagger to
  account for this.
* Add Grape 0.12.0 to Travis
2015-07-10 14:45:45 -06:00
Frédéric Rodrigo 674577bd76 Patch to handle Array Declaration #237 2015-07-02 17:24:48 +02:00
Frédéric Rodrigo 383db676fe Respect primitve mapping on type and format attributs of 1.2 swagger spec: https://github.com/swagger-api/swagger-spec/blob/master/versions/1.2.md#431-primitives 2015-06-30 13:46:36 +02:00
Lasse Skindstad Ebert a0940ce012 Fixed: Consistent types in header params 2015-06-23 11:36:55 +02: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
Yannis Zhang e2e6286cfd Converting integer :values range to a minimum/maximum numeric Range 2015-06-03 22:53:23 +08:00
Ian Young 06111a7f8f A bunch of random changes made by Rubocop 2015-04-30 09:07:53 -07:00
Ian Young b525159ba7 Allow doc API to be mounted from separate class
Fixes the `target_class` option to fully work.

The code structure here is highly questionable (no separation of
concerns, for one thing). But the whole class needs some serious
refactoring, so this will work until that happens, at least.
2015-04-30 09:05:22 -07:00
aitortomas 834ee0111e Fixed model id equal to model name when root existing in entities. 2015-04-27 07:58:11 -04:00
Igor Moochnick 768454bac6 Fixed is_array in the return entity being ignored. 2015-04-01 08:15:50 -04:00
Frédéric Rodrigo eb3553de39 Fix nested entity names in parameters and as $ref in models. 2015-04-01 08:11:18 -04:00
azhi 7b5573dacb Fixed range :values with float
now range values is exposed as array in enum field only if it is Integer or
 String range
 float range or procs returning non-array values is exposed as string
 fixes #233
2015-03-18 20:05:58 +03:00
Shaoxuan Zhang daaad4c475 Fix param_type override 2015-03-13 06:55:51 -04:00
zhangyaning1985@gmail.com 212f854ed7 Fixed missing raw array params 2015-03-13 17:17:26 +08:00
dancostalis a3152841d1 #215 - Adds example parameter to set swaggerDefault value without a Grape default 2015-03-12 10:22:13 -05:00
dblock aed79f0701 Fix: be defensive with nil types in the API documentation. 2015-03-11 10:42:23 -04:00
dblock 24262a90fe Fix: nested routes under prefix not documented. 2015-03-11 10:03:03 -04:00
zhangyaning1985@gmail.com 12dae157e9 Fix group parameters' name with type Array. 2015-03-03 06:52:26 -05:00