Commit Graph

196 Commits

Author SHA1 Message Date
Craig S. Cottingham 78a294a02a Add all options for add_swagger_documentation to README.md 2014-05-26 11:45:13 -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 0642b4355a Fix (some of the) specs 2014-05-12 12:55:09 -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 a724d701b8 Fixes specs 2014-04-24 16:56:34 -03:00
Mauro Torres 6691ba2faf Adds support for models and body param type 2014-04-24 16:53:24 -03:00
Tim Vandecasteele ef40b7892b Regenerate gemspec for version 0.7.2 2014-02-06 08:02:22 +01:00
Tim Vandecasteele 99c9c9882d Version bump to 0.7.2 2014-02-06 08:02:19 +01:00
Tim Vandecasteele ff90e1c387 Revert removal of swagger_doc prefix in apis listing. 2014-02-05 09:03:29 +01:00
Tim Vandecasteele 1936d64cc5 Add small test application, for easy verification with swagger-ui 2014-02-05 09:02:59 +01:00
Tim Vandecasteele 53ed0a2cff Regenerate gemspec for version 0.7.1 2014-02-04 14:01:39 +01:00
Tim Vandecasteele dee09b0462 Version bump to 0.7.1 2014-02-04 14:01:34 +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
Tim Vandecasteele e4cdbddd92 Add jruby to travis configuration. 2014-02-04 13:50:09 +01:00
Tim Vandecasteele 5db87d8756 Merge branch 'pr/61' 2014-02-04 11:42:51 +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
Tim Vandecasteele 209c29f1fa Regenerate gemspec for version 0.7.0 2014-02-04 11:27:59 +01:00
Tim Vandecasteele 60d24ce958 Version bump to 0.7.0 2014-02-04 11:27:52 +01:00
Tim Vandecasteele 80f0c9440e Don't lock grape-entity version 2014-02-04 11:23:10 +01:00
Tim Vandecasteele 4ca0af491b Merge branch 'pr/55' 2014-02-04 10:57: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
Tim Vandecasteele 36464657b1 Merge branch 'pr/69' 2014-02-04 10:34:38 +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 9aee880807 Merge branch 'pr/79' 2014-02-04 10:32:58 +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 a784414230 Merge branch 'pr/77' 2014-02-04 10:26:36 +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
Tim Vandecasteele 6eabc4a6d0 Merge pull request #78 from apaganobeleno/patch-1
readme update: base_path attribute accepts Proc
2014-02-04 01:13:01 -08:00
Tim Vandecasteele 71764f5e50 Merge branch 'pr/82' 2014-02-04 10:04:05 +01:00
Jerome Gravel-Niquet b548623bd3 Follow 1.2 specs more precisely. 2014-02-04 10:03:54 +01:00
Tim Vandecasteele 3645763789 Merge branch 'pr/83' 2014-02-04 09:31:06 +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
Tim Vandecasteele 80b287f36f Merge pull request #84 from MongoHQ/gfm
Use GitHub Flavored Markdown for parsing the markdown
2014-02-04 00:27:26 -08:00
Jerome Gravel-Niquet a0ab101691 Use GitHub Flavored Markdown for parsing the markdown 2014-02-03 20:21:37 -05:00
Antonio Pagano b43434ea19 base_path attribute accepts Proc
Added small description on the base_path that says the newcomer he can use a proc on the base_path attribute
2014-01-08 17:49:07 -05:00
Tim Vandecasteele c1a935ffb2 Merge pull request #76 from spier/http_status_code_documentation
Adding documentation for swagger spec creation for HTTP status codes
2013-12-15 23:19:21 -08:00
Sebastian Spier 0fe76f007b Adding documentation for swagger spec creation for HTTP status codes 2013-12-15 17:09:00 +01:00
Tim Vandecasteele 74a1eeee79 Merge pull request #75 from wellthie/master
Updated to 1.2 w/ passing tests
2013-12-09 01:38:07 -08: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