Skip to content

Instantly share code, notes, and snippets.

@justinyoo
Created March 1, 2016 11:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justinyoo/077fb118c751ae1034fc to your computer and use it in GitHub Desktop.
Save justinyoo/077fb118c751ae1034fc to your computer and use it in GitHub Desktop.
API Management Tips & Tricks
{
"swagger": "2.0",
"info": {
"version": "v1",
"title": "Sample API"
},
"host": "localhost:44321",
"basePath": "/",
"schemes": [ "https" ],
"paths": {
"/values": {
"get": {
"tags": [
"Values"
],
"operationId": "ValuesGet",
"produces": [
"text/plain",
"application/json",
"text/json"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/Responses.ValueResponseCollection"
}
}
},
"deprecated": false
}
},
"/values/{id}": {
"get": {
"tags": [
"Values"
],
"operationId": "ValuesByIdGet",
"produces": [
"text/plain",
"application/json",
"text/json"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "integer",
"format": "int32"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/Responses.ValueResponse"
}
}
},
"deprecated": false
}
}
},
"definitions": {
"Responses.ValueResponseCollection": {
"type": "object",
"properties": {
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/Responses.ValueResponse"
}
}
}
},
"Responses.ValueResponse": {
"type": "object",
"properties": {
"result": {
"type": "string"
}
}
}
},
"securityDefinitions": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment