Created
December 15, 2014 23:41
-
-
Save dilipkrish/57f15967dffa29a4ee8c to your computer and use it in GitHub Desktop.
Rendering parameter types
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "path":"/businesses/byTypes", | |
| "description":"businessesByCategories", | |
| "operations":[ | |
| { | |
| "method":"GET", | |
| "summary":"businessesByCategories", | |
| "notes":"businessesByCategories", | |
| "type":"array", | |
| "items":{ | |
| "$ref":"Business" | |
| }, | |
| "nickname":"businessesByCategories", | |
| "produces":[ | |
| "application/json" | |
| ], | |
| "consumes":[ | |
| "application/json" | |
| ], | |
| "authorizations":{ | |
| "oauth2":[ | |
| { | |
| "scope":"global", | |
| "description":"accessEverything" | |
| } | |
| ] | |
| }, | |
| "parameters":[ | |
| { | |
| "name":"types", | |
| "description":"types", | |
| "defaultValue":"", | |
| "required":true, | |
| "type":"array", | |
| "items":{ | |
| "type":"string" | |
| }, | |
| "paramType":"query", | |
| "allowMultiple":true, | |
| "enum":[ | |
| "PRODUCT", | |
| "SERVICE" | |
| ] | |
| } | |
| ], | |
| "responseMessages":[ | |
| { | |
| "code":200, | |
| "message":null, | |
| "responseModel":"List" | |
| } | |
| ], | |
| "deprecated":"false" | |
| } | |
| ] | |
| } | |
| //Do something like this | |
| { | |
| "path":"/businesses/byTypes", | |
| "description":"businessesByCategories", | |
| "operations":[ | |
| { | |
| "method":"GET", | |
| "summary":"businessesByCategories", | |
| "notes":"businessesByCategories", | |
| "type":"array", | |
| "items":{ | |
| "$ref":"Business" | |
| }, | |
| "nickname":"businessesByCategories", | |
| "produces":[ | |
| "application/json" | |
| ], | |
| "consumes":[ | |
| "application/json" | |
| ], | |
| "authorizations":{ | |
| "oauth2":[ | |
| { | |
| "scope":"global", | |
| "description":"accessEverything" | |
| } | |
| ] | |
| }, | |
| "parameters":[ | |
| { | |
| "name":"types", | |
| "description":"types", | |
| "defaultValue":"", | |
| "required":true, | |
| "type":"ArrayOfString", //<-- Defined in the model section | |
| "paramType":"query", | |
| "allowMultiple":true, | |
| "enum":[ | |
| "PRODUCT", | |
| "SERVICE" | |
| ] | |
| } | |
| ], | |
| "responseMessages":[ | |
| { | |
| "code":200, | |
| "message":null, | |
| "responseModel":"List" | |
| } | |
| ], | |
| "deprecated":"false" | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment