Created
December 13, 2018 16:42
-
-
Save benktesh/de9c9a961224e9057d7022ba82708d5b to your computer and use it in GitHub Desktop.
Revisions
-
benktesh revised this gist
Dec 13, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ ```javascript { "swagger": "2.0", "info": { -
benktesh created this gist
Dec 13, 2018 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,306 @@ ```json { "swagger": "2.0", "info": { "version": "v1", "title": "SmartStock API" }, "paths": { "/api/Stock": { "get": { "tags": [ "Stock" ], "operationId": "GetStock", "consumes": [], "produces": [ "text/plain", "application/json", "text/json" ], "parameters": [], "responses": { "200": { "description": "Success", "schema": { "uniqueItems": false, "type": "array", "items": { "$ref": "#/definitions/Stock" } } } } }, "post": { "tags": [ "Stock" ], "operationId": "PostStock", "consumes": [ "application/json-patch+json", "application/json", "text/json", "application/*+json" ], "produces": [ "text/plain", "application/json", "text/json" ], "parameters": [ { "name": "stock", "in": "body", "required": false, "schema": { "$ref": "#/definitions/Stock" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/Stock" } } } } }, "/api/Stock/{symbol}": { "get": { "tags": [ "Stock" ], "operationId": "GetStock", "consumes": [], "produces": [ "text/plain", "application/json", "text/json" ], "parameters": [ { "name": "symbol", "in": "path", "required": true, "type": "string" } ], "responses": { "200": { "description": "Success", "schema": { "uniqueItems": false, "type": "array", "items": { "$ref": "#/definitions/Stock" } } } } } }, "/api/Stock/{id}": { "delete": { "tags": [ "Stock" ], "operationId": "DeleteStock", "consumes": [], "produces": [ "text/plain", "application/json", "text/json" ], "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string", "format": "uuid" } ], "responses": { "200": { "description": "Success", "schema": { "type": "boolean" } } } } }, "/api/Values": { "get": { "tags": [ "Values" ], "operationId": "Get", "consumes": [], "produces": [ "text/plain", "application/json", "text/json" ], "parameters": [], "responses": { "200": { "description": "Success", "schema": { "uniqueItems": false, "type": "array", "items": { "type": "string" } } } }, "deprecated": true }, "post": { "tags": [ "Values" ], "operationId": "Post", "consumes": [ "application/json-patch+json", "application/json", "text/json", "application/*+json" ], "produces": [], "parameters": [ { "name": "value", "in": "body", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success" } }, "deprecated": true } }, "/api/Values/{id}": { "get": { "tags": [ "Values" ], "operationId": "Get", "consumes": [], "produces": [ "text/plain", "application/json", "text/json" ], "parameters": [ { "name": "id", "in": "path", "required": true, "type": "integer", "format": "int32" } ], "responses": { "200": { "description": "Success", "schema": { "type": "string" } } }, "deprecated": true }, "put": { "tags": [ "Values" ], "operationId": "Put", "consumes": [ "application/json-patch+json", "application/json", "text/json", "application/*+json" ], "produces": [], "parameters": [ { "name": "id", "in": "path", "required": true, "type": "integer", "format": "int32" }, { "name": "value", "in": "body", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success" } }, "deprecated": true }, "delete": { "tags": [ "Values" ], "operationId": "Delete", "consumes": [], "produces": [], "parameters": [ { "name": "id", "in": "path", "required": true, "type": "integer", "format": "int32" } ], "responses": { "200": { "description": "Success" } }, "deprecated": true } } }, "definitions": { "Stock": { "type": "object", "properties": { "id": { "format": "uuid", "type": "string" }, "ticker": { "type": "string" }, "company": { "type": "string" }, "price": { "format": "double", "type": "number" } } } } }