Created
January 8, 2018 09:01
-
-
Save kierenj/5f2d42371abb379c1ebb476378da92f7 to your computer and use it in GitHub Desktop.
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": { | |
"version": "v1", | |
"title": "API" | |
}, | |
"basePath": "\/", | |
"paths": { | |
"\/categories": { | |
"get": { | |
"tags": [ | |
"Categories" | |
], | |
"summary": "Gets a list of categories", | |
"operationId": "CategoriesGet", | |
"consumes": [ | |
], | |
"produces": [ | |
], | |
"responses": { | |
"200": { | |
"description": "Success" | |
} | |
} | |
}, | |
"post": { | |
"tags": [ | |
"Categories" | |
], | |
"summary": "Creates a new category", | |
"operationId": "CategoriesPost", | |
"consumes": [ | |
"application\/json-patch+json", | |
"application\/json", | |
"text\/json", | |
"application\/*+json" | |
], | |
"produces": [ | |
], | |
"parameters": [ | |
{ | |
"name": "request", | |
"in": "body", | |
"required": false, | |
"schema": { | |
"$ref": "#\/definitions\/CreateCategoryRequest" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Success" | |
}, | |
"400": { | |
"description": "One or more errors occurred (BadRequest)", | |
"schema": { | |
"type": "array", | |
"items": { | |
"$ref": "#\/definitions\/ErrorResult" | |
} | |
}, | |
"examples": "{\"$type\":\"RedRiver.Saffron.AspNetCore.ErrorResult[], RedRiver.Saffron.AspNetCore\",\"$values\":[{\"$type\":\"RedRiver.Saffron.AspNetCore.ErrorResult, RedRiver.Saffron.AspNetCore\",\"code\":1004,\"message\":\"Name must be unique\"}]}" | |
} | |
} | |
} | |
}, | |
"\/categories\/{id}": { | |
"delete": { | |
"tags": [ | |
"Categories" | |
], | |
"summary": "Deletes a category by ID", | |
"operationId": "CategoriesByIdDelete", | |
"consumes": [ | |
], | |
"produces": [ | |
], | |
"parameters": [ | |
{ | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"type": "string", | |
"format": "uuid" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Success" | |
}, | |
"404": { | |
"description": "One or more errors occurred (NotFound)", | |
"schema": { | |
"type": "array", | |
"items": { | |
"$ref": "#\/definitions\/ErrorResult" | |
} | |
}, | |
"examples": "{\"$type\":\"RedRiver.Saffron.AspNetCore.ErrorResult[], RedRiver.Saffron.AspNetCore\",\"$values\":[{\"$type\":\"RedRiver.Saffron.AspNetCore.ErrorResult, RedRiver.Saffron.AspNetCore\",\"code\":1003,\"message\":\"Category not found\"}]}" | |
} | |
} | |
} | |
}, | |
"\/functions": { | |
"get": { | |
"tags": [ | |
"Functions" | |
], | |
"summary": "Gets a list of functions", | |
"operationId": "FunctionsGet", | |
"consumes": [ | |
], | |
"produces": [ | |
], | |
"responses": { | |
"200": { | |
"description": "Success" | |
} | |
} | |
} | |
}, | |
"\/setup\/initialise": { | |
"post": { | |
"tags": [ | |
"System Setup" | |
], | |
"summary": "Initalises the environment \/ system", | |
"operationId": "SetupInitialisePost", | |
"consumes": [ | |
], | |
"produces": [ | |
], | |
"responses": { | |
"200": { | |
"description": "Success" | |
} | |
} | |
} | |
} | |
}, | |
"definitions": { | |
"CreateCategoryRequest": { | |
"required": [ | |
"name", | |
"description" | |
], | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"description": { | |
"type": "string" | |
} | |
} | |
}, | |
"ErrorResult": { | |
"type": "object", | |
"properties": { | |
"code": { | |
"format": "int32", | |
"type": "integer" | |
}, | |
"message": { | |
"type": "string" | |
}, | |
"data": { | |
"type": "object" | |
} | |
} | |
} | |
}, | |
"securityDefinitions": { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment