Created
April 12, 2016 18:02
-
-
Save doapp-ryanp/4c04713fc201470b7e54374a1395c756 to your computer and use it in GitHub Desktop.
response reference object
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
{ | |
"swagger": "2.0", | |
"info": { | |
"title": "Swagger 2.0 response ref", | |
"description": "Is valid, but does not work with AWS import", | |
"version": "1.0.0" | |
}, | |
"host": "ws.mlnapi.com", | |
"schemes": [ | |
"https" | |
], | |
"consumes": [ | |
"application/json" | |
], | |
"produces": [ | |
"application/json" | |
], | |
"security": [ | |
{ | |
"api_key": [] | |
} | |
], | |
"securityDefinitions": { | |
"api_key": { | |
"type": "apiKey", | |
"name": "x-api-key", | |
"in": "header" | |
} | |
}, | |
"definitions": { | |
"Error": { | |
"properties": { | |
"error": { | |
"type": "string" | |
}, | |
"code": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"server": { | |
"type": "string" | |
} | |
} | |
} | |
}, | |
"responses": { | |
"200": { | |
"description": "", | |
"headers": { | |
"Cache-Control": { | |
"type": "string" | |
} | |
} | |
}, | |
"400": { | |
"description": "Error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
}, | |
"headers": { | |
"Cache-Control": { | |
"type": "string" | |
} | |
} | |
}, | |
"401": { | |
"description": "Error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
}, | |
"headers": { | |
"Cache-Control": { | |
"type": "string" | |
} | |
} | |
}, | |
"403": { | |
"description": "Error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
}, | |
"headers": { | |
"Cache-Control": { | |
"type": "string" | |
} | |
} | |
}, | |
"500": { | |
"description": "Execution Error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
}, | |
"headers": { | |
"Cache-Control": { | |
"type": "string" | |
} | |
} | |
} | |
}, | |
"paths": { | |
"/testing": { | |
"get": { | |
"summary": "Get a list of something", | |
"description": "Get a list of something", | |
"tags": [ | |
"test" | |
], | |
"responses": { | |
"200": { | |
"$ref": "#/responses/200" | |
}, | |
"400": { | |
"$ref": "#/responses/400" | |
}, | |
"401": { | |
"$ref": "#/responses/401" | |
}, | |
"403": { | |
"$ref": "#/responses/403" | |
}, | |
"500": { | |
"$ref": "#/responses/500" | |
} | |
}, | |
"security": [ | |
{ | |
"api_key": [] | |
} | |
], | |
"x-amazon-apigateway-auth": { | |
"type": "none" | |
}, | |
"x-amazon-apigateway-integration": { | |
"type": "http", | |
"uri": "https://${stageVariables.WsDomain}/test", | |
"httpMethod": "GET", | |
"requestParameters": { | |
}, | |
"responses": { | |
"2\\d{2}": { | |
"statusCode": "200", | |
"responseParameters": { | |
"method.response.header.Cache-Control": "'max-age=600'" | |
} | |
}, | |
"401": { | |
"statusCode": "401", | |
"responseParameters": { | |
"method.response.header.Cache-Control": "'max-age=5'" | |
} | |
}, | |
"403": { | |
"statusCode": "403", | |
"responseParameters": { | |
"method.response.header.Cache-Control": "'max-age=5'" | |
} | |
}, | |
"419": { | |
"statusCode": "419", | |
"responseParameters": { | |
"method.response.header.Cache-Control": "'max-age=0'" | |
} | |
}, | |
"500": { | |
"statusCode": "500", | |
"responseParameters": { | |
"method.response.header.Cache-Control": "'max-age=5'" | |
} | |
}, | |
"default": { | |
"statusCode": "400", | |
"responseParameters": { | |
"method.response.header.Cache-Control": "'max-age=0'" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment