Commit 5871d017 authored by Tifenn Guillas's avatar Tifenn Guillas
Browse files

Update open API doc

parent 146741e2
Pipeline #1880 passed with stages
in 8 minutes and 47 seconds
......@@ -13,8 +13,24 @@ servers:
tags:
- name: root
description: Root path
- name: metadata
- name: metamodel / database
description: Set of actions about metamodel database management
- name: metamodel / project
description: Set of actions about metamodel project management
- name: metamodel / instance
description: Set of actions about metamodel instance management
- name: metamodel / dataset-family
description: Set of actions about metamodel dataset-family management
- name: metamodel / dataset
description: Set of actions about metamodel dataset management
- name: metamodel / criteria-family
description: Set of actions about metamodel criteria-family management
- name: metamodel / output-family
description: Set of actions about metamodel output-family management
- name: metamodel / output-category
description: Set of actions about metamodel output-category management
- name: metamodel / attribute
description: Set of actions about metamodel attribute management
- name: search
description: Access to the data
paths:
......@@ -35,7 +51,7 @@ paths:
/database:
get:
tags:
- metadata
- metamodel / database
summary: List all available databases
description: Anis can connect to databases (PostgreSQL, MySQL, SQLite, Oracle ...). This action lists the databases already registered and where anis can connect.
operationId: getDatabaseList
......@@ -50,7 +66,7 @@ paths:
$ref: '#/components/schemas/Database'
post:
tags:
- metadata
- metamodel / database
summary: Add a new database
description: Anis can connect to databases (PostgreSQL, MySQL, SQLite, Oracle ...). This action add a new data source.
operationId: addDatabase
......@@ -75,58 +91,731 @@ paths:
schema:
$ref: '#/components/schemas/Error'
/database/{id}:
parameters:
- name: id
in: path
description: ID of database to return
required: true
schema:
type: integer
get:
tags:
- metamodel / database
summary: Find a database by ID
description: Returns a single database registered
operationId: getDatabase
responses:
200:
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Database'
404:
description: Database not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
put:
tags:
- metamodel / database
summary: Updates a database with form data
operationId: editDatabase
requestBody:
description: Database form object that needs to be added to the store
content:
application/json:
schema:
$ref: '#/components/schemas/DatabaseForm'
required: true
responses:
200:
description: Database edited
content:
application/json:
schema:
$ref: '#/components/schemas/Database'
400:
description: Invalid input
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
404:
description: Database not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
delete:
tags:
- metamodel / database
summary: Delete a registered database
operationId: deleteDatabase
responses:
200:
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Message'
404:
description: Database not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/database/{id}/table:
parameters:
- name: id
in: path
description: ID of database to return
required: true
schema:
type: integer
get:
tags:
- metamodel / database
summary: Get tables and views list
description: Get tables and views listed in the database identified by the ID parameter
operationId: tableListDatabase
responses:
200:
description: Tables and views list
content:
application/json:
schema:
type: array
items:
type: string
404:
description: Database not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/project:
get:
tags:
- metamodel / project
summary: List all available projects
description: All searchable datasets are listed in one or more projects and a project is attached to a database
operationId: getProjectList
responses:
200:
description: Project list
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Project'
post:
tags:
- metamodel / project
summary: Add a new project
description: All searchable datasets are listed in one or more projects and a project is attached to a database. This action add a new data project.
operationId: addProject
requestBody:
description: Project form object that needs to be added to the store
content:
application/json:
schema:
$ref: '#/components/schemas/Project'
required: true
responses:
201:
description: Project added
content:
application/json:
schema:
$ref: '#/components/schemas/Project'
400:
description: Invalid input
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/project/{name}:
parameters:
- name: name
in: path
description: Name of project to return
required: true
schema:
type: string
get:
tags:
- metamodel / project
summary: Find a project by name
description: Returns a single project registered
operationId: getProject
responses:
200:
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Project'
404:
description: Project not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
put:
tags:
- metamodel / project
summary: Updates a project with form data
operationId: editProject
requestBody:
description: Project form object that needs to be edited to the store
content:
application/json:
schema:
$ref: '#/components/schemas/Project'
required: true
responses:
200:
description: Project edited
content:
application/json:
schema:
$ref: '#/components/schemas/Project'
400:
description: Invalid input
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
404:
description: Project not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
delete:
tags:
- metamodel / project
summary: Delete a registered project
operationId: deleteProject
responses:
200:
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Message'
404:
description: Project not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/instance:
get:
tags:
- metamodel / instance
summary: List all instances
description: Datasets are grouped in an instance wich correspond to a web client.
operationId: getInstanceList
responses:
200:
description: Instance list
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Instance'
post:
tags:
- metamodel / instance
summary: Add a new instance
description: Datasets are grouped in an instance wich correspond to a web client. This action add a new instance.
operationId: addInstance
requestBody:
description: Instance form object that needs to be added to the store
content:
application/json:
schema:
$ref: '#/components/schemas/Instance'
required: true
responses:
201:
description: Instance added
content:
application/json:
schema:
$ref: '#/components/schemas/Instance'
400:
description: Invalid input
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/instance/{name}:
parameters:
- name: name
in: path
description: Name of instance to return
required: true
schema:
type: string
get:
tags:
- metamodel / instance
summary: Find a instance by name
description: Returns a single instance registered
operationId: getInstance
responses:
200:
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Instance'
404:
description: Instance not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
put:
tags:
- metamodel / instance
summary: Updates a instance with form data
operationId: editInstance
requestBody:
description: Instance form object that needs to be edited to the store
content:
application/json:
schema:
$ref: '#/components/schemas/Instance'
required: true
responses:
200:
description: Instance edited
content:
application/json:
schema:
$ref: '#/components/schemas/Instance'
400:
description: Invalid input
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
404:
description: Instance not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
delete:
tags:
- metamodel / instance
summary: Delete a registered instance
operationId: deleteInstance
responses:
200:
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Message'
404:
description: Instance not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/instance/{name}/dataset-family:
parameters:
- name: name
in: path
description: Name of instance where looking for
required: true
schema:
type: string
get:
tags:
- metamodel / instance
- metamodel / dataset-family
summary: List all available dataset families for the given instance
description: Get all dataset families for the given instance
operationId: getDatasetFamilyList
responses:
200:
description: Dataset family list
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/DatasetFamily'
post:
tags:
- metamodel / instance
- metamodel / dataset-family
summary: Add a new dataset family
description: Add a new dataset family to the given instance.
operationId: addDatasetFamily
requestBody:
description: Dataset family form object that needs to be added to the store
content:
application/json:
schema:
$ref: '#/components/schemas/DatasetFamily'
required: true
responses:
201:
description: Dataset family added
content:
application/json:
schema:
$ref: '#/components/schemas/DatasetFamily'
400:
description: Invalid input
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/instance/{name}/dataset:
parameters:
- name: name
in: path
description: Name of instance where looking for
required: true
schema:
type: string
get:
tags:
- metamodel / instance
- metamodel / dataset
summary: List all available datasets for the given instance
description: Get all datasets for the given instance
operationId: getDatasetListByInstance
responses:
200:
description: Dataset list
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Dataset'
/dataset-family/{id}:
parameters:
- name: id
in: path
description: Id of dataset family to return
required: true
schema:
type: integer
get:
tags:
- metamodel / dataset-family
summary: Find a dataset family by id
description: Returns a single dataset family registered
operationId: getDatasetFamily
responses:
200:
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/DatasetFamily'
404:
description: Instance not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
put:
tags:
- metamodel / dataset-family
summary: Updates a dataset family with form data
operationId: editDatasetFamily
requestBody:
description: Dataset family form object that needs to be edited to the store
content:
application/json:
schema:
$ref: '#/components/schemas/DatasetFamily'
required: true
responses:
200:
description: Dataset family edited
content:
application/json:
schema:
$ref: '#/components/schemas/DatasetFamily'
400:
description: Invalid input
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
404:
description: Instance not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
delete:
tags:
- metamodel / dataset-family
summary: Delete a dataset family instance
operationId: deleteDatasetFamily
responses:
200:
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Message'
404:
description: Dataset family not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/dataset-family/{id}/dataset:
parameters:
- name: id
in: path
description: Id of dataset family where to looking for
required: true
schema:
type: integer
get:
tags:
- metamodel / dataset-family
- metamodel / dataset
summary: List all available datasets for the given dataset family
description: Get all searchable datasets for the given dataset family
operationId: getDatasetList
responses:
200:
description: Dataset list
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Dataset'
post:
tags:
- metamodel / dataset-family
- metamodel / dataset
summary: Add a new dataset with the given dataset family. This action add automatically the associated attributes (columns)
operationId: addDataset
requestBody:
description: Dataset form object that needs to be added to the store
content:
application/json:
schema:
$ref: '#/components/schemas/Dataset'
required: true
responses:
201:
description: Dataset added
content:
application/json:
schema:
$ref: '#/components/schemas/Dataset'
400:
description: Invalid input
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
404:
description: Dataset family not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/dataset/{name}:
parameters:
- name: name
in: path
description: Name of dataset to return
required: true
schema:
type: string
get:
tags:
- metamodel / dataset
summary: Find a dataset by name
description: Returns a single dataset registered
operationId: getDataset
responses:
200:
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Dataset'
404:
description: Dataset not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
put:
tags:
- metamodel / dataset
summary: Updates a dataset with form data
operationId: editDataset
requestBody:
description: Dataset form object that needs to be edited to the store
content:
application/json:
schema:
$ref: '#/components/schemas/Dataset'
required: true
responses:
200:
description: Dataset edited
content:
application/json: