{ "apiVersion": null, "swaggerVersion": "1.2", "basePath": "http://localhost:3333/api", "resourcePath": "/templates/", "produces": [ "application/json" ], "apis": [ { "path": "/templates/", "operations": [ { "method": "GET", "summary": "Returns all templates for the given user", "notes": "Requires an API Key", "responseClass": "List[Template]", "nickname": "getTemplates", "responseMessages": [ { "code": 400, "message": "Invalid API Key" }, { "code": 404, "message": "API Key not set" } ] }, { "method": "POST", "summary": "Create template", "notes": "Requires an API Key", "responseClass": "void", "nickname": "createTemplate", "parameters": [ { "name": "body", "description": "Template to be added", "required": true, "allowMultiple": false, "dataType": "Template", "paramType": "body" } ], "responseMessages": [ { "code": 400, "message": "Invalid API Key" }, { "code": 404, "message": "API Key not set" }, { "code": 400, "message": "Invalid template supplied" } ] } ] }, { "path": "/templates/{templateId}", "operations": [ { "method": "GET", "summary": "Find template by ID", "notes": "Requires an API Key", "responseClass": "Template", "nickname": "getTemplateById", "produces": [ "application/json" ], "parameters": [ { "name": "templateId", "description": "ID of template that needs to be fetched", "required": true, "allowMultiple": false, "dataType": "int64", "paramType": "path" } ], "responseMessages": [ { "code": 400, "message": "Invalid API Key" }, { "code": 404, "message": "API Key not set" }, { "code": 400, "message": "Invalid ID supplied" }, { "code": 404, "message": "Template not found" } ] }, { "method": "PUT", "summary": "Update template", "notes": "Requires an API Key", "responseClass": "Template", "nickname": "putTemplate", "parameters": [ { "name": "body", "description": "Template to be updated", "required": true, "allowMultiple": false, "dataType": "Template", "paramType": "body" }, { "name": "templateId", "description": "ID of the template that needs to be deleted", "required": true, "allowMultiple": false, "dataType": "int64", "paramType": "path" } ], "responseMessages": [ { "code": 400, "message": "Invalid API Key" }, { "code": 404, "message": "API Key not set" }, { "code": 400, "message": "Invalid template supplied" } ] }, { "method": "DELETE", "summary": "Delete template", "notes": "Requires an API Key", "responseClass": "void", "nickname": "deleteTemplate", "parameters": [ { "name": "templateId", "description": "ID of the template that needs to be deleted", "required": true, "allowMultiple": false, "dataType": "int64", "paramType": "path" } ], "responseMessages": [ { "code": 400, "message": "Invalid API Key" }, { "code": 404, "message": "API Key not set" }, { "code": 400, "message": "Invalid ID supplied" }, { "code": 404, "message": "Template not found" } ] } ] } ], "models": { "Template": { "id": "Template", "properties": { "name": { "type" : "string" }, "id": { "type": "integer", "format": "int64" }, "html": { "type": "string" }, "text": { "type" : "string" } } } } }