Newer
Older
openapi: 3.0.0
info:
title: FramaCRestfulApiForPkm
version: 1.0.0
contact:
email: decoder@decoder-project.eu
license:
Gilles Mouchard
committed
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
Gilles Mouchard
committed
- url: https://pkm-api_frama-c_1:8081
paths:
/frama_c/{dbName}:
post:
operationId: frama_c
parameters:
- name: dbName
description: Database name from where to get source code/header files and put analysis results
in: path
required: true
schema:
type: string
- $ref: '#/components/parameters/keyParam'
requestBody:
content:
application/json:
schema:
type : object
properties:
source_file_paths:
description: Source Code filenames to process
type: array
items:
type: string
x-codegen-request-body-name: body
responses:
200:
description: Successful operation
headers:
Access-Control-Allow-Origin:
$ref: '#/components/headers/Access-Control-Allow-Origin'
Gilles Mouchard
committed
Access-Control-Allow-Methods:
$ref: '#/components/headers/Access-Control-Allow-Methods'
Access-Control-Allow-Headers:
$ref: '#/components/headers/Access-Control-Allow-Headers'
content:
application/json:
schema:
type: object
properties:
stdout:
type: string
stderr:
type: string
400:
description: Bad request
headers:
Access-Control-Allow-Origin:
$ref: '#/components/headers/Access-Control-Allow-Origin'
Gilles Mouchard
committed
Access-Control-Allow-Methods:
$ref: '#/components/headers/Access-Control-Allow-Methods'
Access-Control-Allow-Headers:
$ref: '#/components/headers/Access-Control-Allow-Headers'
content:
application/json:
schema:
type: string
description: error message
401:
description: Unauthorized operation, returns an error message
headers:
Access-Control-Allow-Origin:
$ref: '#/components/headers/Access-Control-Allow-Origin'
Gilles Mouchard
committed
Access-Control-Allow-Methods:
$ref: '#/components/headers/Access-Control-Allow-Methods'
Access-Control-Allow-Headers:
$ref: '#/components/headers/Access-Control-Allow-Headers'
content:
application/json:
schema:
type: string
description: error message
403:
description: Forbidden operation, returns an error message
headers:
Access-Control-Allow-Origin:
$ref: '#/components/headers/Access-Control-Allow-Origin'
Gilles Mouchard
committed
Access-Control-Allow-Methods:
$ref: '#/components/headers/Access-Control-Allow-Methods'
Access-Control-Allow-Headers:
$ref: '#/components/headers/Access-Control-Allow-Headers'
content:
application/json:
schema:
type: string
description: error message
404:
description: Not found, returns an error message
headers:
Access-Control-Allow-Origin:
$ref: '#/components/headers/Access-Control-Allow-Origin'
Gilles Mouchard
committed
Access-Control-Allow-Methods:
$ref: '#/components/headers/Access-Control-Allow-Methods'
Access-Control-Allow-Headers:
$ref: '#/components/headers/Access-Control-Allow-Headers'
content:
application/json:
schema:
type: string
description: error message
500:
description: Internal Server Error, returns an error message
headers:
Access-Control-Allow-Origin:
$ref: '#/components/headers/Access-Control-Allow-Origin'
Gilles Mouchard
committed
Access-Control-Allow-Methods:
$ref: '#/components/headers/Access-Control-Allow-Methods'
Access-Control-Allow-Headers:
$ref: '#/components/headers/Access-Control-Allow-Headers'
content:
application/json:
schema:
type: string
description: error message
Gilles Mouchard
committed
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
/frama_c/jobs/{jobId}:
get:
operationId: getJob
parameters:
- name: jobId
description: Job identifier
in: path
required: true
schema:
type: integer
minimum: 0
- $ref: '#/components/parameters/keyParam'
responses:
200:
description: Successful operation, returns a job
headers:
Access-Control-Allow-Origin:
$ref: '#/components/headers/Access-Control-Allow-Origin'
Access-Control-Allow-Methods:
$ref: '#/components/headers/Access-Control-Allow-Methods'
Access-Control-Allow-Headers:
$ref: '#/components/headers/Access-Control-Allow-Headers'
content:
application/json:
schema:
$ref: '#/components/schemas/Job'
400:
description: Bad request
headers:
Access-Control-Allow-Origin:
$ref: '#/components/headers/Access-Control-Allow-Origin'
Access-Control-Allow-Methods:
$ref: '#/components/headers/Access-Control-Allow-Methods'
Access-Control-Allow-Headers:
$ref: '#/components/headers/Access-Control-Allow-Headers'
content:
application/json:
schema:
type: string
description: error message
401:
description: Unauthorized operation, returns an error message
headers:
Access-Control-Allow-Origin:
$ref: '#/components/headers/Access-Control-Allow-Origin'
Access-Control-Allow-Methods:
$ref: '#/components/headers/Access-Control-Allow-Methods'
Access-Control-Allow-Headers:
$ref: '#/components/headers/Access-Control-Allow-Headers'
content:
application/json:
schema:
type: string
description: error message
403:
description: Forbidden operation, returns an error message
headers:
Access-Control-Allow-Origin:
$ref: '#/components/headers/Access-Control-Allow-Origin'
Access-Control-Allow-Methods:
$ref: '#/components/headers/Access-Control-Allow-Methods'
Access-Control-Allow-Headers:
$ref: '#/components/headers/Access-Control-Allow-Headers'
content:
application/json:
schema:
type: string
description: error message
404:
description: Not found, returns an error message
headers:
Access-Control-Allow-Origin:
$ref: '#/components/headers/Access-Control-Allow-Origin'
Access-Control-Allow-Methods:
$ref: '#/components/headers/Access-Control-Allow-Methods'
Access-Control-Allow-Headers:
$ref: '#/components/headers/Access-Control-Allow-Headers'
content:
application/json:
schema:
type: string
description: error message
500:
description: Internal Server Error, returns an error message
headers:
Access-Control-Allow-Origin:
$ref: '#/components/headers/Access-Control-Allow-Origin'
Access-Control-Allow-Methods:
$ref: '#/components/headers/Access-Control-Allow-Methods'
Access-Control-Allow-Headers:
$ref: '#/components/headers/Access-Control-Allow-Headers'
content:
application/json:
schema:
type: string
description: error message
components:
parameters:
keyParam:
name: key
description: Access key to the PKM (optional, depending on server configuration)
in: header
schema:
type: string
Gilles Mouchard
committed
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
schemas:
Job:
type: object
description: a job
properties:
id:
description: job identifier
type: integer
minimum: 0
service_name:
description: name of the service running the job
type: string
parameters:
description: parameters of the job
type: object
properties:
dbName:
description: database name
type: string
source_file_paths:
description: Source Code filenames that job processes
type: array
items:
description: Source Code filename that job processes
type: string
state:
description: job state
enum: [pending, running, failed, finished]
start_date:
description: date (GMT) when job started
type: string
end_date:
description: date (GMT) when job ended
type: string
logs:
description: log messages
type: string
warnings:
type: string
description: warning messages
err:
description: error
type: object
Gilles Mouchard
committed
# for CORS (Cross-Origin Resource Sharing)
Access-Control-Allow-Origin:
schema:
type: string
default: '*'
Gilles Mouchard
committed
Access-Control-Allow-Methods:
schema:
type: string
default: 'GET, POST, PUT, DELETE, OPTIONS'
Access-Control-Allow-Headers:
schema:
type: string
default: 'Origin, Content-Type, Accept'