Commit Graph

165 Commits

Author SHA1 Message Date
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
Cedric Röck 6539914227 First iteration to implement standalone appearance of nested routes, includes README update. 2015-03-01 19:41:38 +01:00
Ernest Bursa 21f5f2a732 Added support for multiple entities in entity: desc. 2015-02-20 10:12:18 -05:00
Adam Weller ea58020a33 Match index routes that do not contain :format, as it has been explicitly
declared in the resource, e.g., `format :json`.

TODO:  Add spec(s).
2015-02-13 15:58:41 +03:00
Zachary Belzer 6f67a2952b Allow callables for hidden setting 2015-02-12 11:58:49 -06:00
Hasan Kumar Reddy A 11854d9488 Mark required elements inside group in mutually exclusive set as optional 2015-02-07 16:55:40 +05:30
zhangyaning1985@gmail.com 6fbb96d388 require grape first 2015-02-05 06:12:48 +08:00
zhangyaning1985@gmail.com 2ac951f42c Fixed the range :values option, now exposed as enum parameters 2015-02-04 00:24:45 +08:00
Daniel Doubrovkine (dB.) @dblockdotorg 6f87127519 Merge pull request #208 from u2/float_value
Fix float value type
2015-02-02 11:34:45 -05:00
Yuya Tanaka f180ce64a8 Treat type: Symbol as string form paramter 2015-02-02 02:06:12 +09:00
zhangyaning1985@gmail.com 2723a73015 Fixed Float parameters, exposed as Swagger float types 2015-02-01 11:53:18 +08:00
Jordan Hollinger 3c6475ffb4 If :type is omitted, see if it's available in :using 2015-01-17 13:59:18 -05:00
Jordan Hollinger fd65d91dbe Accept :using as a string 2014-12-15 16:24:04 -05:00
dB 9ba84dc90f Fix build on Rbx. 2014-12-01 10:40:09 -05:00
dB e9c3f2c76b Removed unused methods and paths. 2014-12-01 09:34:46 -05:00
dB d155810667 Fix: grape HEAD after https://github.com/intridea/grape/pull/831. 2014-12-01 09:09:30 -05:00
dB 24050b2635 Fixed compatibility with Grape HEAD, related to https://github.com/intridea/grape/pull/809. 2014-11-29 13:48:11 -05:00
dblock 4249c61b49 Support multi-tenanted APIs, don't cache base_path. 2014-11-28 11:38:58 -05:00
dblock cf90765fcb Fixed Hash parameters, now exposed as Swagger object types. 2014-11-28 11:25:23 -05:00
dblock dbe01f630b Fix: Document Virtus::Attribute::Boolean as boolean. 2014-11-28 11:06:14 -05:00
Sergey Verevkin c6f976ac2a Added ability to load nested models recursively. 2014-11-21 18:27:25 -05:00
Grzegorz Bizon ba02fdb7c1 Fix problem with using prefix name somewhere in api paths 2014-11-13 09:42:38 +01:00
dblock f9f87c5fa2 Ensure compatibility with Grape 0.8.0, 0.9.0 and 0.9.1. 2014-11-10 15:13:06 -05:00
Elad Ossadon cdd877bda7 Make sure models array has uniq models (otherwise it piles up duplicates from previous calls and affects performance severly). 2014-11-01 09:47:43 -04:00
Dave Tapley 15604b039c Fix #91: Empty field for group parameters' name with type Hash or Array. 2014-10-21 07:11:39 -04:00
Matt Margolis 0a91765563 Allow the use of Classes for type declarations inside documentation 2014-10-07 09:21:21 -05:00
Timo Sulg 04566fcdb4 Added support for Rack::Multipart::UploadedFile parameters, fixes #47. 2014-08-17 06:49:03 -04:00
Antek Drzewiecki 5dfbf1db5d Added support for kramdown, redcarpet and custom formatters. 2014-08-14 15:31:59 +02:00
Renier Morales 6b89d4a67f Recurse combination of namespaces when using mounted apps.
Added test and changelog entry.
2014-08-03 18:00:05 -04:00
Cédric Darné 30e8c9257c Fixed model inclusion in models with aliased references. 2014-08-01 07:31:05 -04:00
Antek Drzewiecki f1e91ce990 Added value support for grape enties. 2014-07-30 15:49:04 +02:00
Antek Drzewiecki fd5dfb2b5b Added support for values in form parameters 2014-07-30 12:02:46 +02:00
Daniel Doubrovkine (dB.) @dblockdotorg e81d3052e3 Merge pull request #124 from dblock/api-desc-and-params
Added ability to change the description and parameters of the API endpoints generated by grape-swagger.
2014-07-28 07:43:03 -04:00
Dieter Späth 10e903aef9 combined global models with endpoint entities 2014-07-24 16:11:10 +02:00
dblock 001bb86c28 Fixed undefined method reject for nil:NilClass error on an undefined route. 2014-07-22 10:24:05 -04:00
dblock e1773cd7b7 Added ability to change the description and parameters of the API endpoints generated by grape-swagger. 2014-07-22 09:35:12 -04:00
Daniel Doubrovkine (dB.) @dblockdotorg 28f1bc0c1b Merge pull request #100 from maginatics/FW-Port
Should be able to override the generated nicknames
2014-07-17 07:21:42 -04:00
Dieter Späth 860da153d3 Added support for generating nested models from composed Grape Entities. 2014-07-16 12:20:10 -04:00
Leon Horne 5c9317cdea Adding override of auto generated nickname
Swagger has a nickname filed specified in the 1.2 standard. It is used
to generate an alternate name for code generators to use for that api.
This patch provides a way to override the generated nickname with one
specified in the grape documentation.

    Example:
          desc(
            'Get all the cloud profiles in the system',
            :nickname => 'getAllCloudProfiles',
          )
2014-07-15 19:48:46 -07:00
Tim Warberg ef70deed8d Allow markdown in the API info description. 2014-07-14 11:35:03 -04:00