1 | ---
|
---|
2 | swagger: '2.0'
|
---|
3 | info:
|
---|
4 | title: Project-Builder.org
|
---|
5 | description: PBSUMMARY
|
---|
6 | license:
|
---|
7 | name: General Public License 3.0
|
---|
8 | url: http://www.gnu.org/
|
---|
9 | #termsOfService: 'http://www.example.com/terms'
|
---|
10 | contact:
|
---|
11 | name: API Support
|
---|
12 | url: 'http://www.project-builder.org/support'
|
---|
13 | #email: support@example.com
|
---|
14 | version: 'PBAPIVER'
|
---|
15 | host: localhost
|
---|
16 | basePath: /api/vPBAPIVER
|
---|
17 | schemes:
|
---|
18 | - http
|
---|
19 | consumes:
|
---|
20 | - application/json
|
---|
21 | - application/yaml
|
---|
22 | produces:
|
---|
23 | - application/json
|
---|
24 | - application/yaml
|
---|
25 | paths:
|
---|
26 | /doc:
|
---|
27 | get:
|
---|
28 | summary: API Documentation
|
---|
29 | operationId: docPb
|
---|
30 | tags:
|
---|
31 | - pb
|
---|
32 | responses:
|
---|
33 | '200':
|
---|
34 | description: Expected response to a valid request
|
---|
35 | schema:
|
---|
36 | $ref: '#/definitions/Conf'
|
---|
37 | default:
|
---|
38 | description: Unexpected error
|
---|
39 | schema:
|
---|
40 | $ref: '#/definitions/Error'
|
---|
41 | /prj:
|
---|
42 | get:
|
---|
43 | summary: List all projects
|
---|
44 | operationId: listPrj
|
---|
45 | tags:
|
---|
46 | - prj
|
---|
47 | responses:
|
---|
48 | '200':
|
---|
49 | description: List of all projects managed by project-builder.org
|
---|
50 | schema:
|
---|
51 | $ref: '#/definitions/Prj'
|
---|
52 | default:
|
---|
53 | description: Unexpected error
|
---|
54 | schema:
|
---|
55 | $ref: '#/definitions/Error'
|
---|
56 | put:
|
---|
57 | summary: Create a new project
|
---|
58 | operationId: newPrj
|
---|
59 | tags:
|
---|
60 | - prj
|
---|
61 | parameters:
|
---|
62 | - name: name
|
---|
63 | #in: body
|
---|
64 | description: Add project by name
|
---|
65 | required: true
|
---|
66 | schema:
|
---|
67 | $ref: '#/definitions/Prj'
|
---|
68 | responses:
|
---|
69 | '200':
|
---|
70 | description: Expected response to a valid request
|
---|
71 | schema:
|
---|
72 | $ref: '#/definitions/Prj'
|
---|
73 | '409':
|
---|
74 | description: Null response
|
---|
75 | schema:
|
---|
76 | $ref: '#/definitions/Error'
|
---|
77 | default:
|
---|
78 | description: Unexpected error
|
---|
79 | schema:
|
---|
80 | $ref: '#/definitions/Error'
|
---|
81 | '/prj/{prjname}/conf':
|
---|
82 | get:
|
---|
83 | summary: List all configuration parameters for a specific project
|
---|
84 | operationId: listConf
|
---|
85 | tags:
|
---|
86 | - conf
|
---|
87 | parameters:
|
---|
88 | - name: prjname
|
---|
89 | in: path
|
---|
90 | required: true
|
---|
91 | description: The name of the project that will be queried for configuration
|
---|
92 | type: string
|
---|
93 | responses:
|
---|
94 | '200':
|
---|
95 | description: Expected response to a valid request
|
---|
96 | schema:
|
---|
97 | items:
|
---|
98 | $ref: '#/definitions/Conf'
|
---|
99 | default:
|
---|
100 | description: Unexpected error
|
---|
101 | schema:
|
---|
102 | $ref: '#/definitions/Error'
|
---|
103 | '/prj/{prjname}/conf/{confname}':
|
---|
104 | get:
|
---|
105 | operationId: showConf
|
---|
106 | tags:
|
---|
107 | - conf
|
---|
108 | parameters:
|
---|
109 | - name: prjname
|
---|
110 | in: path
|
---|
111 | required: true
|
---|
112 | description: The name of the project for which we retrieve configuration
|
---|
113 | type: string
|
---|
114 | - name: confname
|
---|
115 | in: path
|
---|
116 | required: true
|
---|
117 | description: The name of the configuration item that will be queried
|
---|
118 | responses:
|
---|
119 | '200':
|
---|
120 | description: Expected response to a valid request
|
---|
121 | schema:
|
---|
122 | $ref: '#/definitions/Conf'
|
---|
123 | default:
|
---|
124 | description: Unexpected error
|
---|
125 | schema:
|
---|
126 | $ref: '#/definitions/Error'
|
---|
127 | put:
|
---|
128 | operationId: updateConf
|
---|
129 | tags:
|
---|
130 | - conf
|
---|
131 | parameters:
|
---|
132 | - name: name
|
---|
133 | #in: body
|
---|
134 | description: Add a configuration item by name
|
---|
135 | required: true
|
---|
136 | schema:
|
---|
137 | $ref: '#/definitions/Conf'
|
---|
138 | responses:
|
---|
139 | '200':
|
---|
140 | description: Expected response to a valid request
|
---|
141 | schema:
|
---|
142 | $ref: '#/definitions/Conf'
|
---|
143 | '409':
|
---|
144 | description: Null response
|
---|
145 | schema:
|
---|
146 | $ref: '#/definitions/Error'
|
---|
147 | default:
|
---|
148 | description: Unexpected error
|
---|
149 | schema:
|
---|
150 | $ref: '#/definitions/Error'
|
---|
151 | delete:
|
---|
152 | operationId: removeConf
|
---|
153 | parameters:
|
---|
154 | - name: prjname
|
---|
155 | in: path
|
---|
156 | required: true
|
---|
157 | description: The name of the project for which we retrieve configuration
|
---|
158 | type: string
|
---|
159 | - name: confname
|
---|
160 | in: path
|
---|
161 | required: true
|
---|
162 | description: The name of the configuration item that will be deleted
|
---|
163 | responses:
|
---|
164 | '200':
|
---|
165 | description: Expected response to a valid request
|
---|
166 | '404':
|
---|
167 | description: Configuration item not found
|
---|
168 | default:
|
---|
169 | description: Unexpected error
|
---|
170 | schema:
|
---|
171 | $ref: '#/definitions/Error'
|
---|
172 | definitions:
|
---|
173 | Prj:
|
---|
174 | required:
|
---|
175 | - name
|
---|
176 | properties:
|
---|
177 | name:
|
---|
178 | type: string
|
---|
179 | tag:
|
---|
180 | type: string
|
---|
181 | Conf:
|
---|
182 | required:
|
---|
183 | - name
|
---|
184 | properties:
|
---|
185 | name:
|
---|
186 | type: string
|
---|
187 | tag:
|
---|
188 | type: string
|
---|
189 | Error:
|
---|
190 | required:
|
---|
191 | - code
|
---|
192 | - message
|
---|
193 | properties:
|
---|
194 | code:
|
---|
195 | type: integer
|
---|
196 | format: int32
|
---|
197 | message:
|
---|
198 | type: string
|
---|