source: ProjectBuilder/devel/pb-modules/etc/api.yaml

Last change on this file was 2637, checked in by Bruno Cornec, 4 years ago

More tar extensions fixes

File size: 4.1 KB
Line 
1---
2# test with https://redocly.github.io/redoc/?url=http://trac.project-builder.org/browser/devel/pb-modules/etc/api.yaml?format=txt
3openapi: '3.0'
4info:
5 title: Project-Builder.org
6 description: PBSUMMARY
7 license:
8 name: General Public License 3.0
9 url: http://www.gnu.org/
10 #termsOfService: 'http://www.example.com/terms'
11 contact:
12 name: API Support
13 url: 'http://www.project-builder.org/support'
14 #email: support@example.com
15 version: 'PBAPIVER'
16host: localhost
17basePath: /api/vPBAPIVER
18schemes:
19 - http
20consumes:
21 - application/json
22 - application/yaml
23produces:
24 - application/json
25 - application/yaml
26# Global parameters
27paths:
28 /hello:
29 operationId: helloWorld
30 x-mojo-name: hello_world
31 x-mojo-to: example#hello_world
32 summary: Test entry point
33 responses:
34 '200':
35 description: Return hello
36 schema:
37 type: object
38 properties:
39 greetings:
40 type: string
41 default:
42 description: Unexpected error
43 schema:
44 $ref: '#/definitions/Error'
45 /doc:
46 get:
47 summary: API Documentation
48 operationId: docPb
49 tags:
50 - pb
51 responses:
52 '200':
53 description: Expected response to a valid request
54 schema:
55 $ref: '#/definitions/Conf'
56 default:
57 description: Unexpected error
58 schema:
59 $ref: '#/definitions/Error'
60 /prj:
61 get:
62 summary: List all projects
63 operationId: listPrjs
64 tags:
65 - prj
66 responses:
67 '200':
68 description: List of all projects managed by project-builder.org
69 schema:
70 $ref: '#/definitions/Prj'
71 default:
72 description: Unexpected error
73 schema:
74 $ref: '#/definitions/Error'
75 put:
76 summary: Create a new project
77 operationId: newPrj
78 tags:
79 - prj
80 parameters:
81 - name: name
82 in: body
83 description: Add project by name
84 required: true
85 schema:
86 $ref: '#/definitions/Prj'
87 responses:
88 '200':
89 description: Expected response to a valid request
90 schema:
91 $ref: '#/definitions/Prj'
92 '409':
93 description: Null response
94 schema:
95 $ref: '#/definitions/Error'
96 default:
97 description: Unexpected error
98 schema:
99 $ref: '#/definitions/Error'
100 '/conf/{prj}':
101 get:
102 # Use a YAML HEREDOC syntax
103 summary: |
104 List all configuration parameters
105 for a specific project
106 operationId: listConf
107 tags:
108 - conf
109 parameters:
110 - $ref: '#/parameters/prj'
111 responses:
112 '200':
113 description: Expected response to a valid request
114 schema:
115 items:
116 $ref: '#/definitions/Conf'
117 default:
118 description: Unexpected error
119 schema:
120 $ref: '#/definitions/Error'
121 '/conf/{prj}/{confname}':
122 get:
123 operationId: showConf
124 summary: Get a configuration item
125 tags:
126 - conf
127 parameters:
128 - $ref: '#/parameters/prj'
129 - name: confname
130 in: path
131 type: string
132 required: true
133 description: The name of the configuration item that will be queried
134 responses:
135 '200':
136 description: Expected response to a valid request
137 schema:
138 $ref: '#/definitions/Conf'
139 default:
140 description: Unexpected error
141 schema:
142 $ref: '#/definitions/Error'
143parameters:
144 prj:
145 name: prj
146 description: The name of the project that will be queried
147 required: true
148 in: path
149 type: string
150definitions:
151 Prj:
152 required:
153 - name
154 properties:
155 name:
156 type: string
157 tag:
158 type: string
159 Conf:
160 required:
161 - name
162 properties:
163 name:
164 type: string
165 tag:
166 type: string
167 Error:
168 required:
169 - code
170 - message
171 properties:
172 code:
173 type: integer
174 format: int32
175 message:
176 type: string
Note: See TracBrowser for help on using the repository browser.