-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.json
116 lines (116 loc) · 3.64 KB
/
api.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
{
"swagger":"2.0",
"info": {
"version": "0.1.0",
"title": "Docs API",
"description": "Manage DOCX templates and generate documents based on them."
},
"host": "api.populus.pet",
"basePath": "/docs/v1",
"schemes": [
"http"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/templates/{owner}": {
"post": {
"summary": "Add a new docx template for a given owner.",
"operationId": "addTemplate",
"tags": [
"Templates"
],
"parameters": [
{
"name": "owner",
"in": "path",
"description": "Identifier of the template owner (user, organization, etc).",
"required": true,
"type": "string"
},
{
"name": "template_file",
"in": "body",
"description": "DOCX Template file item.",
"required": true,
"schema": {
"$ref": "#/definitions/template_file"
}
}
],
"responses": {
"201": {
"description": "Template item created.",
"schema": {
"type": "object",
"properties": {
"template_id": {
"type": "string"
}
}
}
},
"default": {
"description": "Unexpected error.",
"schema": {
"$ref": "#/definitions/error_response"
}
}
}
}
}
},
"definitions": {
"template_file": {
"type": "object",
"description": "Template file item definition.",
"required": [
"encoded_file"
],
"properties": {
"encoded_file": {
"type": "string",
"description": "Base64 encoded DOCX template file."
},
"schema": {
"type": "object",
"description": "A schema definition for the data to be added to the template."
}
}
},
"template_item": {
"type": "object",
"description": "A docx template item definition.",
"required": [
"owner",
"encoded_file"
],
"properties": {
"template_id": {
"type": "string",
"description": "Template ID."
},
"owner": {
"type": "string",
"description": "A string identifier for the owner of the template (user, organization, etc)."
},
"schema": {
"type": "object",
"description": "A schema definition for the data to be added to the template."
}
}
},
"error_response": {
"properties": {
"error": {
"description": "Error message.",
"type": "string"
}
}
}
}
}