Created
May 10, 2018 20:28
-
-
Save BartMassey/b58a73520d5ca1b66a6486d4fb345fc6 to your computer and use it in GitHub Desktop.
Swagger 2.0 complex parameter demo
This file contains 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
{ | |
"consumes": [ | |
"application/json" | |
], | |
"swagger": "2.0", | |
"basePath": "/", | |
"schemes": [ | |
"https" | |
], | |
"produces": [ | |
"application/json" | |
], | |
"host": "localhost", | |
"paths": { | |
"/demo": { | |
"get": { | |
"summary": "Demo parameters", | |
"responses": { | |
"200": { | |
"schema": { | |
"items": { | |
"format": "int32", | |
"title": "Demo Item", | |
"type": "integer", | |
"description": "Demo item" | |
}, | |
"maxItems": 1000, | |
"title": "get_demo_ok", | |
"type": "array", | |
"description": "List of demo items" | |
}, | |
"description": "Demo Swagger 2.0 parameter handling" | |
} | |
}, | |
"parameters": [ | |
{ | |
"uniqueItems": true, | |
"items": { | |
"minItems": 2, | |
"uniqueItems": true, | |
"items": { | |
"format": "int32", | |
"type": "integer" | |
}, | |
"maxItems": 2, | |
"collectionFormat": "pipes", | |
"type": "array" | |
}, | |
"in": "query", | |
"name": "parameter", | |
"maxItems": 100, | |
"type": "array", | |
"description": "demo parameter" | |
}], | |
"operationId": "get_demo", | |
"description": "Demo Swagger parameter handling" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment