2014-02-11 17:39:36 +00:00
|
|
|
{
|
|
|
|
"apiVersion": null,
|
|
|
|
"swaggerVersion": "1.2",
|
2014-03-17 03:22:47 +00:00
|
|
|
"basePath": "http://localhost:3333/api",
|
|
|
|
"resourcePath": "/templates/",
|
2014-02-11 17:39:36 +00:00
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"apis": [
|
2014-02-11 23:32:29 +00:00
|
|
|
{
|
|
|
|
"path": "/templates/",
|
2014-02-11 17:39:36 +00:00
|
|
|
"operations": [
|
|
|
|
{
|
|
|
|
"method": "GET",
|
2014-02-11 23:32:29 +00:00
|
|
|
"summary": "Returns all templates for the given user",
|
2014-02-11 17:39:36 +00:00
|
|
|
"notes": "Requires an API Key",
|
2014-02-11 23:32:29 +00:00
|
|
|
"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",
|
2014-02-11 17:39:36 +00:00
|
|
|
"parameters": [
|
|
|
|
{
|
2014-02-11 23:32:29 +00:00
|
|
|
"name": "body",
|
|
|
|
"description": "Template to be added",
|
2014-02-11 17:39:36 +00:00
|
|
|
"required": true,
|
|
|
|
"allowMultiple": false,
|
2014-02-11 23:32:29 +00:00
|
|
|
"dataType": "Template",
|
|
|
|
"paramType": "body"
|
2014-02-11 17:39:36 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"responseMessages": [
|
|
|
|
{
|
|
|
|
"code": 400,
|
|
|
|
"message": "Invalid API Key"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"code": 404,
|
|
|
|
"message": "API Key not set"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"code": 400,
|
2014-02-11 23:32:29 +00:00
|
|
|
"message": "Invalid template supplied"
|
2014-02-11 17:39:36 +00:00
|
|
|
}
|
|
|
|
]
|
2014-02-11 23:32:29 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"path": "/templates/{templateId}",
|
|
|
|
"operations": [
|
2014-02-11 17:39:36 +00:00
|
|
|
{
|
2014-02-11 23:32:29 +00:00
|
|
|
"method": "GET",
|
|
|
|
"summary": "Find template by ID",
|
2014-02-11 17:39:36 +00:00
|
|
|
"notes": "Requires an API Key",
|
2014-02-11 23:32:29 +00:00
|
|
|
"responseClass": "Template",
|
|
|
|
"nickname": "getTemplateById",
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
2014-02-11 17:39:36 +00:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"name": "templateId",
|
2014-02-11 23:32:29 +00:00
|
|
|
"description": "ID of template that needs to be fetched",
|
2014-02-11 17:39:36 +00:00
|
|
|
"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",
|
2014-02-11 23:32:29 +00:00
|
|
|
"summary": "Update template",
|
2014-02-11 17:39:36 +00:00
|
|
|
"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"
|
|
|
|
}
|
|
|
|
]
|
2014-02-11 23:32:29 +00:00
|
|
|
},
|
2014-02-11 17:39:36 +00:00
|
|
|
{
|
2014-02-11 23:32:29 +00:00
|
|
|
"method": "DELETE",
|
|
|
|
"summary": "Delete template",
|
2014-02-11 17:39:36 +00:00
|
|
|
"notes": "Requires an API Key",
|
|
|
|
"responseClass": "void",
|
2014-02-11 23:32:29 +00:00
|
|
|
"nickname": "deleteTemplate",
|
2014-02-11 17:39:36 +00:00
|
|
|
"parameters": [
|
|
|
|
{
|
2014-02-11 23:32:29 +00:00
|
|
|
"name": "templateId",
|
|
|
|
"description": "ID of the template that needs to be deleted",
|
2014-02-11 17:39:36 +00:00
|
|
|
"required": true,
|
|
|
|
"allowMultiple": false,
|
2014-02-11 23:32:29 +00:00
|
|
|
"dataType": "int64",
|
|
|
|
"paramType": "path"
|
2014-02-11 17:39:36 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"responseMessages": [
|
|
|
|
{
|
|
|
|
"code": 400,
|
|
|
|
"message": "Invalid API Key"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"code": 404,
|
|
|
|
"message": "API Key not set"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"code": 400,
|
2014-02-11 23:32:29 +00:00
|
|
|
"message": "Invalid ID supplied"
|
2014-02-11 17:39:36 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"code": 404,
|
2014-02-11 23:32:29 +00:00
|
|
|
"message": "Template not found"
|
2014-02-11 17:39:36 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"models": {
|
|
|
|
"Template": {
|
|
|
|
"id": "Template",
|
|
|
|
"properties": {
|
|
|
|
"name": {
|
|
|
|
"type" : "string"
|
|
|
|
},
|
|
|
|
"id": {
|
|
|
|
"type": "integer",
|
|
|
|
"format": "int64"
|
|
|
|
},
|
|
|
|
"html": {
|
|
|
|
"type": "string"
|
2014-03-17 03:22:47 +00:00
|
|
|
},
|
|
|
|
"text": {
|
|
|
|
"type" : "string"
|
2014-02-11 17:39:36 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|