Created
October 9, 2019 15:19
-
-
Save intolerance/a68c7ed266cdbd046a0bd74cab826580 to your computer and use it in GitHub Desktop.
paperless-db-swagger
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": "This is for a mongo API\n", | |
"version": "1.0.1", | |
"title": "MongoPaperless", | |
"contact": { | |
"email": "taylor.fry@mail.weir" | |
}, | |
"license": { | |
"name": "WTFPL", | |
"url": "http://www.wtfpl.net" | |
} | |
}, | |
"host": "virtserver.swaggerhub.com", | |
"basePath": "/data", | |
"tags": [ | |
{ | |
"name": "Cells", | |
"description": "Cell Operations for creation, deletion, and edits", | |
"externalDocs": { | |
"description": "Creating, editing, and deleting work cells.", | |
"url": "http://swagger.io" | |
} | |
}, | |
{ | |
"name": "Value Streams", | |
"description": "Value Streams", | |
"externalDocs": { | |
"description": "Creating, editing, and deleting value streams", | |
"url": "http://swagger.io" | |
} | |
}, | |
{ | |
"name": "Users", | |
"description": "Syteline Users", | |
"externalDocs": { | |
"description": "Creating, editing, and deleting users", | |
"url": "http://swagger.io" | |
} | |
} | |
], | |
"schemes": [ | |
"https", | |
"http" | |
], | |
"paths": { | |
"/cells": { | |
"get": { | |
"tags": [ | |
"Cells" | |
], | |
"summary": "Retrieves list of cells", | |
"description": "Retrieves list of cells", | |
"parameters": [], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"schema": { | |
"$ref": "#/definitions/Cells" | |
} | |
}, | |
"401": { | |
"description": "Not Authorized." | |
}, | |
"500": { | |
"description": "Error." | |
} | |
} | |
}, | |
"post": { | |
"tags": [ | |
"Cells" | |
], | |
"summary": "Create a Cell", | |
"description": "Create a cell from an authorized user", | |
"operationId": "createCell", | |
"produces": [ | |
"application/json" | |
], | |
"parameters": [ | |
{ | |
"in": "body", | |
"name": "body", | |
"description": "Created cell object", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/Cell" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "OK" | |
}, | |
"401": { | |
"description": "Not Authorized." | |
}, | |
"500": { | |
"description": "Error." | |
} | |
} | |
} | |
}, | |
"/cells/{cellID}": { | |
"get": { | |
"tags": [ | |
"Cells" | |
], | |
"summary": "Retrieves the specified cell object", | |
"description": "Retrieves the specified cell object", | |
"parameters": [ | |
{ | |
"name": "cellID", | |
"in": "path", | |
"description": "The unique ID of the cell", | |
"required": true, | |
"type": "string" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"schema": { | |
"$ref": "#/definitions/Cell" | |
} | |
}, | |
"401": { | |
"description": "Not Authorized." | |
}, | |
"500": { | |
"description": "Error." | |
} | |
} | |
}, | |
"delete": { | |
"tags": [ | |
"Cells" | |
], | |
"summary": "Deletes a cell.", | |
"description": "Deletes a cell.", | |
"parameters": [ | |
{ | |
"name": "cellID", | |
"in": "path", | |
"description": "The unique ID of the cell", | |
"required": true, | |
"type": "string" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"schema": { | |
"$ref": "#/definitions/Cell" | |
} | |
}, | |
"401": { | |
"description": "Not Authorized." | |
}, | |
"500": { | |
"description": "Error." | |
} | |
} | |
}, | |
"patch": { | |
"tags": [ | |
"Cells" | |
], | |
"summary": "Updates Cell", | |
"description": "Updates a cell from an authorized user", | |
"produces": [ | |
"application/json" | |
], | |
"parameters": [ | |
{ | |
"name": "cellID", | |
"in": "path", | |
"description": "The unique ID of the cell", | |
"required": true, | |
"type": "string" | |
}, | |
{ | |
"in": "body", | |
"name": "body", | |
"description": "Updated cell object", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/Cell" | |
} | |
} | |
], | |
"responses": { | |
"default": { | |
"description": "successful operation" | |
} | |
} | |
} | |
}, | |
"/valuestreams": { | |
"get": { | |
"tags": [ | |
"Value Streams" | |
], | |
"summary": "Retrieves list of value streams", | |
"description": "Retrieves list of value streams", | |
"parameters": [], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"schema": { | |
"$ref": "#/definitions/valueStreams" | |
} | |
}, | |
"401": { | |
"description": "Not Authorized." | |
}, | |
"500": { | |
"description": "Error." | |
} | |
} | |
}, | |
"post": { | |
"tags": [ | |
"Value Streams" | |
], | |
"summary": "Create a Value Stream", | |
"description": "Create a value stream from an authorized user", | |
"operationId": "createValueStream", | |
"produces": [ | |
"application/json" | |
], | |
"parameters": [ | |
{ | |
"in": "body", | |
"name": "body", | |
"description": "Created value stram object", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/valueStream" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "OK" | |
}, | |
"401": { | |
"description": "Not Authorized." | |
}, | |
"500": { | |
"description": "Error." | |
} | |
} | |
} | |
}, | |
"/valuestreams/{valueStreamID}": { | |
"get": { | |
"tags": [ | |
"Value Streams" | |
], | |
"summary": "Retrieves the specified value stream object", | |
"description": "Retrieves the specified value stream object", | |
"parameters": [ | |
{ | |
"name": "valueStreamID", | |
"in": "path", | |
"description": "The unique ID of the value stream", | |
"required": true, | |
"type": "string" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"schema": { | |
"$ref": "#/definitions/valueStream" | |
} | |
}, | |
"401": { | |
"description": "Not Authorized." | |
}, | |
"500": { | |
"description": "Error." | |
} | |
} | |
}, | |
"delete": { | |
"tags": [ | |
"Value Streams" | |
], | |
"summary": "Deletes a value stream.", | |
"description": "Deletes a value stream.", | |
"parameters": [ | |
{ | |
"name": "valueStreamID", | |
"in": "path", | |
"description": "The unique ID of the value stream", | |
"required": true, | |
"type": "string" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "OK" | |
}, | |
"401": { | |
"description": "Not Authorized." | |
}, | |
"500": { | |
"description": "Error." | |
} | |
} | |
}, | |
"patch": { | |
"tags": [ | |
"Value Streams" | |
], | |
"summary": "Updates Value Stream", | |
"description": "Updates a value stream from an authorized user", | |
"produces": [ | |
"application/json" | |
], | |
"parameters": [ | |
{ | |
"name": "valueStreamID", | |
"in": "path", | |
"description": "The unique ID of the value stream", | |
"required": true, | |
"type": "string" | |
}, | |
{ | |
"in": "body", | |
"name": "body", | |
"description": "Created value stream object", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/valueStream" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "successful operation", | |
"schema": { | |
"$ref": "#/definitions/valueStream" | |
} | |
}, | |
"401": { | |
"description": "Not Authorized." | |
}, | |
"500": { | |
"description": "Error." | |
} | |
} | |
} | |
}, | |
"/users": { | |
"get": { | |
"tags": [ | |
"Users" | |
], | |
"summary": "Retrieves list of users", | |
"description": "Retrieves list of users", | |
"parameters": [], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"schema": { | |
"$ref": "#/definitions/Users" | |
} | |
}, | |
"401": { | |
"description": "Not Authorized." | |
}, | |
"500": { | |
"description": "Error." | |
} | |
} | |
}, | |
"post": { | |
"tags": [ | |
"Users" | |
], | |
"summary": "Create a User", | |
"description": "Create a user from an authorized user", | |
"operationId": "createUser", | |
"produces": [ | |
"application/json" | |
], | |
"parameters": [ | |
{ | |
"in": "body", | |
"name": "body", | |
"description": "Created user object", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/User" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "OK" | |
}, | |
"401": { | |
"description": "Not Authorized." | |
}, | |
"500": { | |
"description": "Error." | |
} | |
} | |
} | |
}, | |
"/users/{userID}": { | |
"get": { | |
"tags": [ | |
"Users" | |
], | |
"summary": "Retrieves the specified user object", | |
"description": "Retrieves the specified user object", | |
"parameters": [ | |
{ | |
"name": "userID", | |
"in": "path", | |
"description": "The unique ID of the user", | |
"required": true, | |
"type": "string" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"schema": { | |
"$ref": "#/definitions/User" | |
} | |
}, | |
"401": { | |
"description": "Not Authorized." | |
}, | |
"500": { | |
"description": "Error." | |
} | |
} | |
}, | |
"delete": { | |
"tags": [ | |
"Users" | |
], | |
"summary": "Deletes a user.", | |
"description": "Deletes a user.", | |
"parameters": [ | |
{ | |
"name": "userID", | |
"in": "path", | |
"description": "The unique ID of the user", | |
"required": true, | |
"type": "string" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "OK" | |
}, | |
"401": { | |
"description": "Not Authorized." | |
}, | |
"500": { | |
"description": "Error." | |
} | |
} | |
}, | |
"patch": { | |
"tags": [ | |
"Users" | |
], | |
"summary": "Updates User", | |
"description": "Updates a user from an authorized user", | |
"produces": [ | |
"application/json" | |
], | |
"parameters": [ | |
{ | |
"name": "userID", | |
"in": "path", | |
"description": "The unique ID of the user.", | |
"required": true, | |
"type": "string" | |
}, | |
{ | |
"in": "body", | |
"name": "body", | |
"description": "user object", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/User" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"schema": { | |
"$ref": "#/definitions/User" | |
} | |
}, | |
"401": { | |
"description": "Not Authorized." | |
}, | |
"500": { | |
"description": "Error." | |
} | |
} | |
} | |
} | |
}, | |
"definitions": { | |
"Cell": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer", | |
"format": "int64" | |
}, | |
"jobFormat": { | |
"type": "string" | |
}, | |
"valueStream": { | |
"type": "string" | |
}, | |
"schedMethod": { | |
"type": "integer", | |
"format": "int64" | |
}, | |
"fromWarehouse": { | |
"type": "string" | |
}, | |
"toWarehouse": { | |
"type": "string" | |
}, | |
"fromLocation": { | |
"type": "string" | |
}, | |
"toLocation": { | |
"type": "string" | |
} | |
} | |
}, | |
"valueStream": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"building": { | |
"type": "string" | |
} | |
} | |
}, | |
"User": { | |
"type": "object", | |
"properties": { | |
"syteLineID": { | |
"type": "string" | |
} | |
} | |
}, | |
"Cells": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Cell" | |
} | |
}, | |
"valueStreams": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/valueStream" | |
} | |
}, | |
"Users": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/User" | |
} | |
} | |
}, | |
"externalDocs": { | |
"description": "Find out more about Swagger", | |
"url": "http://swagger.io" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment