Commit Graph

106 Commits

Author SHA1 Message Date
Craig S. Cottingham 2f35d85bb8 Add #is_primitive? and #generate_typeref 2014-05-28 15:09:06 -05:00
Craig S. Cottingham d205202ddc Fix non-reentrantness in #parse_entity_models 2014-05-28 14:42:32 -05:00
Craig S. Cottingham 9a9d85f56d Change the way required properties in models are indicated in the JSON 2014-05-28 14:34:12 -05:00
Craig S. Cottingham 50541bdf2a Clean up authorizations 2014-05-28 13:51:18 -05:00
Craig S. Cottingham 4302ea187d Clean up commented-out code 2014-05-28 11:29:54 -05:00
Craig S. Cottingham 60e3012a7f Fix API paths and add a default description 2014-05-28 11:23:41 -05:00
Craig S. Cottingham 239a348e8b Remove unneeded (and disallowed according to spec) elements from the root documentation 2014-05-28 10:42:54 -05:00
Craig S. Cottingham f88ada91a7 Fix file upload elements 2014-05-28 10:42:27 -05:00
Craig S. Cottingham 26e13fa9c5 Clean up output in lib/grape-swagger.rb 2014-05-27 13:21:02 -05:00
Craig S. Cottingham a25e9ef5a6 Add comment to add authorizations to operations 2014-05-26 15:49:58 -05:00
Craig S. Cottingham af690af14e Check for complex types in parse_params 2014-05-12 16:46:00 -05:00
Craig S. Cottingham 55fc2206cf Clean up after merge of PR #104 2014-05-12 15:15:23 -05:00
Craig S. Cottingham 376a327212 Merge branch 'refs/heads/pr/104' into swagger-ui
Conflicts:
	lib/grape-swagger.rb
2014-05-12 14:46:38 -05:00
Craig S. Cottingham b69cdaaa93 Correctly handle arrays of items and complex types in params 2014-05-12 12:54:54 -05:00
Craig S. Cottingham 87c8c7b638 Properly describe arrays in parse_entity_models() 2014-05-12 11:30:06 -05:00
Craig S. Cottingham 32ea455b08 Lots of changes to make API doc compatible with swagger-ui
Conflicts:
	README.markdown
	lib/grape-swagger.rb
2014-05-12 11:29:03 -05:00
Mauro Torres 6691ba2faf Adds support for models and body param type 2014-04-24 16:53:24 -03:00
Tim Vandecasteele ff90e1c387 Revert removal of swagger_doc prefix in apis listing. 2014-02-05 09:03:29 +01:00
Tim Vandecasteele 67f72f0b15 Render markdown as GFM, especially for code blocks. 2014-02-04 14:01:16 +01:00
Tim Vandecasteele 598d028db0 Revert Merge pull request #84 from MongoHQ/gfm
Compatibility with jruby was lost.
2014-02-04 13:55:18 +01:00
Jon Daniel 225c91e10a added formatting options to swagger metadata
Trying to use the current version of grape-swagger with swagger-ui resulted in
some headaches because by default grape-swagger generates API meta-data in XML
but swagger-ui and the rest of our APIs at my organization are expecting JSON.

To solve this problem I added a section to setup options called `:formatting`.
This hash can accept `:format`, `:default_format`, and
`:default_error_formatter`. These options can be passed in when calling
`add_swagger_documentation`.

Example

```ruby

add_swagger_documentation format: :json

```
2014-02-04 11:42:43 +01:00
Caleb Woods fb75eedf16 Adding support for form parameters for PUT and PATCH method types 2014-02-04 10:57:37 +01:00
dm1try 64fb8e90a9 if base_path is relative make it absolute using request.base_uri 2014-02-04 10:34:07 +01:00
Tim Vandecasteele 317c29b597 Update spec for datatype and add in headers. 2014-02-04 10:32:43 +01:00
Phobos98 a8bc4c9748 Add dataType to the params output 2014-02-04 10:30:10 +01:00
Tim Vandecasteele 5400575aa9 When no default value given, also don't put it in the json. 2014-02-04 10:26:27 +01:00
John Griffin accf771041 support defaultValue on params and headers 2014-02-04 10:14:31 +01:00
Jerome Gravel-Niquet b548623bd3 Follow 1.2 specs more precisely. 2014-02-04 10:03:54 +01:00
Jerome Gravel-Niquet 37b66aca31 DRYing the entity name parsing 2014-02-04 09:30:28 +01:00
Jerome Gravel-Niquet 4bbb94afd1 more flexible Entity 2014-02-04 09:30:28 +01:00
Jerome Gravel-Niquet a0ab101691 Use GitHub Flavored Markdown for parsing the markdown 2014-02-03 20:21:37 -05:00
Joel Van Horn b107f53eb0 Use the proper default content types for "produces" 2013-12-06 00:10:52 -05:00
Joel Van Horn 81bd20a110 "notes" should be an empty string by default 2013-12-05 23:52:09 -05:00
Joel Van Horn b5b42ab5da Fixed "desc" to "description" renaming 2013-12-05 20:50:47 -05:00
Joel Van Horn f4782f0c12 Rename "desc" to "description" for Grape Entities 2013-12-05 20:40:51 -05:00
Joel Van Horn 53c8b45e15 Merge branch 'api-info' of github.com:mattbeedle/grape-swagger into mattbeedle-api-info
Conflicts:
	lib/grape-swagger.rb
	spec/api_models_spec.rb
	spec/default_api_spec.rb
	spec/hide_api_spec.rb
	spec/non_default_api_spec.rb
	spec/simple_mounted_api_spec.rb
2013-12-05 20:31:02 -05:00
Joel Van Horn 9d609e023a Added "produces" for 1.2 2013-12-05 19:50:13 -05:00
Joel Van Horn e240ff2c8f Renamed "errorResponses" to "responseMessages" for 1.2 2013-12-05 19:49:24 -05:00
Joel Van Horn 61879bb030 Renamed "dataType" to "type" for 1.2 2013-12-05 19:48:26 -05:00
Joel Van Horn 0e15843534 Fixed spelling of "authorizations" 2013-12-05 19:47:07 -05:00
Joel Van Horn 506eb7a9c7 Add "operations" back by default 2013-12-05 17:46:46 -05:00
Joel Van Horn 85caf9f1eb Don't add "info" by default 2013-12-05 17:46:38 -05:00
Ernest Bursa 3958a1cbc6 fix 2013-11-27 21:09:29 +01:00
Ernest Bursa 1d03228e06 fix 2013-11-27 15:22:53 +01:00
Ernest Bursa 41f4330ff6 fix 2013-11-27 14:59:04 +01:00
Ernest Bursa 1a097b437f fix 2013-11-27 14:29:40 +01:00
Ernest Bursa 1ffde40bf1 fix 2013-11-27 13:45:24 +01:00
Ernest Bursa 652464fef6 fix 2013-11-27 13:43:44 +01:00
Ernest Bursa 3dc0120ad4 min fix 2013-11-27 13:35:36 +01:00
Ernest Bursa 69994a74c2 add stomplets 2013-11-27 11:44:08 +01:00