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 | # Global parameters
|
---|
26 | paths:
|
---|
27 | /doc:
|
---|
28 | get:
|
---|
29 | summary: API Documentation
|
---|
30 | operationId: docPb
|
---|
31 | tags:
|
---|
32 | - pb
|
---|
33 | responses:
|
---|
34 | '200':
|
---|
35 | description: Expected response to a valid request
|
---|
36 | schema:
|
---|
37 | $ref: '#/definitions/Conf'
|
---|
38 | default:
|
---|
39 | description: Unexpected error
|
---|
40 | schema:
|
---|
41 | $ref: '#/definitions/Error'
|
---|
42 | /prj:
|
---|
43 | get:
|
---|
44 | summary: List all projects
|
---|
45 | operationId: listPrjs
|
---|
46 | tags:
|
---|
47 | - prj
|
---|
48 | responses:
|
---|
49 | '200':
|
---|
50 | description: List of all projects managed by project-builder.org
|
---|
51 | schema:
|
---|
52 | $ref: '#/definitions/Prj'
|
---|
53 | default:
|
---|
54 | description: Unexpected error
|
---|
55 | schema:
|
---|
56 | $ref: '#/definitions/Error'
|
---|
57 | put:
|
---|
58 | summary: Create a new project
|
---|
59 | operationId: newPrj
|
---|
60 | tags:
|
---|
61 | - prj
|
---|
62 | parameters:
|
---|
63 | - name: name
|
---|
64 | in: body
|
---|
65 | description: Add project by name
|
---|
66 | required: true
|
---|
67 | schema:
|
---|
68 | $ref: '#/definitions/Prj'
|
---|
69 | responses:
|
---|
70 | '200':
|
---|
71 | description: Expected response to a valid request
|
---|
72 | schema:
|
---|
73 | $ref: '#/definitions/Prj'
|
---|
74 | '409':
|
---|
75 | description: Null response
|
---|
76 | schema:
|
---|
77 | $ref: '#/definitions/Error'
|
---|
78 | default:
|
---|
79 | description: Unexpected error
|
---|
80 | schema:
|
---|
81 | $ref: '#/definitions/Error'
|
---|
82 | '/conf/{prj}':
|
---|
83 | get:
|
---|
84 | summary: List all configuration parameters for a specific project
|
---|
85 | operationId: listConf
|
---|
86 | tags:
|
---|
87 | - conf
|
---|
88 | parameters:
|
---|
89 | - $ref: '#/parameters/prj'
|
---|
90 | responses:
|
---|
91 | '200':
|
---|
92 | description: Expected response to a valid request
|
---|
93 | schema:
|
---|
94 | items:
|
---|
95 | $ref: '#/definitions/Conf'
|
---|
96 | default:
|
---|
97 | description: Unexpected error
|
---|
98 | schema:
|
---|
99 | $ref: '#/definitions/Error'
|
---|
100 | '/conf/{prj}/{confname}':
|
---|
101 | get:
|
---|
102 | operationId: showConf
|
---|
103 | summary: Get a configuration item
|
---|
104 | tags:
|
---|
105 | - conf
|
---|
106 | parameters:
|
---|
107 | - $ref: '#/parameters/prj'
|
---|
108 | - name: confname
|
---|
109 | in: path
|
---|
110 | type: string
|
---|
111 | required: true
|
---|
112 | description: The name of the configuration item that will be queried
|
---|
113 | responses:
|
---|
114 | '200':
|
---|
115 | description: Expected response to a valid request
|
---|
116 | schema:
|
---|
117 | $ref: '#/definitions/Conf'
|
---|
118 | default:
|
---|
119 | description: Unexpected error
|
---|
120 | schema:
|
---|
121 | $ref: '#/definitions/Error'
|
---|
122 | parameters:
|
---|
123 | prj:
|
---|
124 | name: prj
|
---|
125 | description: The name of the project that will be queried
|
---|
126 | required: true
|
---|
127 | in: path
|
---|
128 | type: string
|
---|
129 | definitions:
|
---|
130 | Prj:
|
---|
131 | required:
|
---|
132 | - name
|
---|
133 | properties:
|
---|
134 | name:
|
---|
135 | type: string
|
---|
136 | tag:
|
---|
137 | type: string
|
---|
138 | Conf:
|
---|
139 | required:
|
---|
140 | - name
|
---|
141 | properties:
|
---|
142 | name:
|
---|
143 | type: string
|
---|
144 | tag:
|
---|
145 | type: string
|
---|
146 | Error:
|
---|
147 | required:
|
---|
148 | - code
|
---|
149 | - message
|
---|
150 | properties:
|
---|
151 | code:
|
---|
152 | type: integer
|
---|
153 | format: int32
|
---|
154 | message:
|
---|
155 | type: string
|
---|