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
components:
parameters:
keyParam:
name: key
description: Access key to the PKM (optional, depending on server configuration)
in: header
schema:
type: string
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'