blob: 7f99775fcda88d6bc007554b9750f8f828adb141 [file] [log] [blame]
sheetalm297209b2018-02-20 19:06:27 +05301{
2 "swagger" : "2.0",
3 "info" : {
4 "description" : "Rest API Documentation",
5 "version" : "v1.0, build #${buildNumber}",
6 "title" : "Rest API",
7 "termsOfService" : "http://www.github.com/kongchen/swagger-maven-plugin"
8 },
9 "basePath" : "/activityspec-api",
10 "tags" : [ {
11 "name" : "Activity Specs"
12 } ],
13 "schemes" : [ "http" ],
14 "paths" : {
15 "/v1.0/activity-spec" : {
16 "get" : {
17 "tags" : [ "Activity Specs" ],
18 "summary" : "Get list of activity specs ",
19 "description" : "",
20 "operationId" : "list",
21 "consumes" : [ "application/json" ],
22 "produces" : [ "application/json" ],
23 "parameters" : [ {
24 "name" : "status",
25 "in" : "query",
26 "description" : "Currently supported values: 'Certified' - only activity specs with Certified status",
27 "required" : false,
28 "type" : "string"
29 }, {
30 "name" : "USER_ID",
31 "in" : "header",
32 "required" : false,
33 "type" : "string",
34 "default" : ""
35 } ],
36 "responses" : {
37 "default" : {
38 "description" : "successful operation"
39 }
40 }
41 },
42 "post" : {
43 "tags" : [ "Activity Specs" ],
44 "summary" : "Create Activity Spec",
45 "description" : "",
46 "operationId" : "createActivitySpec",
47 "consumes" : [ "application/json" ],
48 "produces" : [ "application/json" ],
49 "parameters" : [ {
50 "in" : "body",
51 "name" : "body",
52 "required" : false,
53 "schema" : {
54 "$ref" : "#/definitions/ActivitySpecRequest"
55 }
56 }, {
57 "name" : "USER_ID",
58 "in" : "header",
59 "required" : false,
60 "type" : "string",
61 "default" : ""
62 } ],
63 "responses" : {
64 "default" : {
65 "description" : "successful operation"
66 }
67 }
68 }
69 },
70 "/v1.0/activity-spec/{id}/versions/{versionId}" : {
71 "get" : {
72 "tags" : [ "Activity Specs" ],
73 "summary" : "Get Activity Spec",
74 "description" : "",
75 "operationId" : "getActivitySpec",
76 "consumes" : [ "application/json" ],
77 "produces" : [ "application/json" ],
78 "parameters" : [ {
79 "name" : "id",
80 "in" : "path",
81 "description" : "Activity Spec Id",
82 "required" : true,
83 "type" : "string"
84 }, {
85 "name" : "versionId",
86 "in" : "path",
87 "description" : "Version Id",
88 "required" : true,
89 "type" : "string"
90 }, {
91 "name" : "USER_ID",
92 "in" : "header",
93 "required" : false,
94 "type" : "string",
95 "default" : ""
96 } ],
97 "responses" : {
98 "default" : {
99 "description" : "successful operation"
100 }
101 }
102 },
103 "put" : {
104 "tags" : [ "Activity Specs" ],
105 "summary" : "Update Activity Spec",
106 "description" : "",
107 "operationId" : "updateActivitySpec",
108 "consumes" : [ "application/json" ],
109 "produces" : [ "application/json" ],
110 "parameters" : [ {
111 "in" : "body",
112 "name" : "body",
113 "required" : false,
114 "schema" : {
115 "$ref" : "#/definitions/ActivitySpecRequest"
116 }
117 }, {
118 "name" : "id",
119 "in" : "path",
120 "description" : "Activity Spec Id",
121 "required" : true,
122 "type" : "string"
123 }, {
124 "name" : "versionId",
125 "in" : "path",
126 "description" : "Version Id",
127 "required" : true,
128 "type" : "string"
129 }, {
130 "name" : "USER_ID",
131 "in" : "header",
132 "required" : false,
133 "type" : "string",
134 "default" : ""
135 } ],
136 "responses" : {
137 "default" : {
138 "description" : "successful operation"
139 }
140 }
141 }
142 },
143 "/v1.0/activity-spec/{id}/versions/{versionId}/actions" : {
144 "put" : {
145 "tags" : [ "Activity Specs" ],
146 "summary" : "Actions on a activity spec",
147 "description" : "Performs one of the following actions on a activity spec: |Submit: Finalize its active version.|Deprecate: Deprecate activity spec.|",
148 "operationId" : "actOnActivitySpec",
149 "consumes" : [ "application/json" ],
150 "produces" : [ "application/json" ],
151 "parameters" : [ {
152 "in" : "body",
153 "name" : "body",
154 "required" : false,
155 "schema" : {
156 "$ref" : "#/definitions/ActivitySpecActionRequestDto"
157 }
158 }, {
159 "name" : "id",
160 "in" : "path",
161 "description" : "Activity Spec Id",
162 "required" : true,
163 "type" : "string"
164 }, {
165 "name" : "versionId",
166 "in" : "path",
167 "description" : "Version Id",
168 "required" : true,
169 "type" : "string"
170 }, {
171 "name" : "USER_ID",
172 "in" : "header",
173 "required" : false,
174 "type" : "string",
175 "default" : ""
176 } ],
177 "responses" : {
178 "default" : {
179 "description" : "successful operation"
180 }
181 }
182 }
183 }
184 },
185 "definitions" : {
186 "ActivitySpecActionRequestDto" : {
187 "type" : "object",
188 "properties" : {
189 "action" : {
190 "type" : "string",
191 "enum" : [ "Certify", "Deprecate", "Delete" ]
192 }
193 }
194 },
195 "ActivitySpecParameterDto" : {
196 "type" : "object",
197 "properties" : {
198 "name" : {
199 "type" : "string"
200 },
201 "type" : {
202 "type" : "string"
203 },
204 "value" : {
205 "type" : "string"
206 }
207 }
208 },
209 "ActivitySpecRequest" : {
210 "type" : "object",
211 "properties" : {
212 "name" : {
213 "type" : "string"
214 },
215 "description" : {
216 "type" : "string"
217 },
218 "categoryList" : {
219 "type" : "array",
220 "items" : {
221 "type" : "string"
222 }
223 },
224 "inputParameters" : {
225 "type" : "array",
226 "items" : {
227 "$ref" : "#/definitions/ActivitySpecParameterDto"
228 }
229 },
230 "outputParameters" : {
231 "type" : "array",
232 "items" : {
233 "$ref" : "#/definitions/ActivitySpecParameterDto"
234 }
235 }
236 }
237 }
238 }
239}