Created
February 28, 2018 15:14
-
-
Save jvarness/bf5feeaf95498dd88b1b971c448671b0 to your computer and use it in GitHub Desktop.
Schema
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
{ | |
"swagger": "2.0", | |
"info": { | |
"description": "The RESTful endpoints for the Foo Service.", | |
"version": "1.0.0", | |
"title": "Foo REST", | |
"contact": { | |
"name": "Jake Varness", | |
"email": "jake.varness@gmail.com" | |
} | |
} | |
"schemes": ["https"], | |
"paths": { | |
"/search": { | |
"get": { | |
"tags": ["search"], | |
"summary": "Finds foos matching the search string", | |
"description": "Searches for foos", | |
"operationId": "fooSearch", | |
"produces": ["application/json"], | |
"parameters": [{ | |
"name": "searchString", | |
"in": "query", | |
"description": "The string used to search for foos", | |
"required": true, | |
"type": "string" | |
}, | |
{ | |
"name": "fooType", | |
"in": "query", | |
"description": "The type of foo to search for", | |
"required": false, | |
"type": "string" | |
}, | |
{ | |
"in": "header", | |
"name": "Custom-Required-Header", | |
"description": "Useful thing for debugging", | |
"required": true, | |
"type": "string" | |
}], | |
"responses": { | |
"200": { | |
"description": "successful operation", | |
"schema": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"fooId": { | |
"type": "string" | |
} | |
}, | |
"xml": { | |
"name": "Foo" | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Invalid search parameters supplied" | |
}, | |
"404": { | |
"description": "No foo found matching criteria" | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment