Skip to content

Commit

Permalink
Updating DataStore API definition to consider ResourcesAPI structure (#…
Browse files Browse the repository at this point in the history
…2368)

Fixing sorting fields on OpenAPI

Updating OpenAPI to consider DataStore endpoint managing only one record

Add endpoint in plural
  • Loading branch information
danielbdias committed Apr 20, 2023
1 parent edd9a5e commit ea05beb
Showing 1 changed file with 6 additions and 78 deletions.
84 changes: 6 additions & 78 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1091,59 +1091,10 @@ paths:
description: "problem deleting a demo"

# Data Stores
/datastores:
get:
tags:
- api
summary: "Get all Data Stores"
description: "Get all Data Stores"
operationId: getDataStores
parameters:
- $ref: "./parameters.yaml#/components/parameters/take"
- $ref: "./parameters.yaml#/components/parameters/skip"
- $ref: "./parameters.yaml#/components/parameters/query"
- $ref: "./parameters.yaml#/components/parameters/sortBy"
- $ref: "./parameters.yaml#/components/parameters/sortDirection"
responses:
200:
description: successful operation
headers:
X-Total-Count:
schema:
type: integer
description: Total records count
content:
application/json:
schema:
type: array
items:
$ref: "./dataStores.yaml#/components/schemas/DataStore"
500:
description: "problem with getting data stores"
post:
tags:
- api
summary: "Create a new Data Store"
description: "Create a new Data Store"
operationId: createDataStore
requestBody:
content:
application/json:
schema:
$ref: "./dataStores.yaml#/components/schemas/DataStore"
responses:
200:
description: successful operation
content:
application/json:
schema:
$ref: "./dataStores.yaml#/components/schemas/DataStore"
400:
description: "trying to create a data store with an already existing ID"
/datastores/{dataStoreId}:
get:
tags:
- api
- resource-api
parameters:
- $ref: "./parameters.yaml#/components/parameters/dataStoreId"
summary: "Get a Data Store"
Expand All @@ -1156,11 +1107,13 @@ paths:
application/json:
schema:
$ref: "./dataStores.yaml#/components/schemas/DataStore"
404:
description: "data store not found"
500:
description: "problem with getting a data store"
put:
tags:
- api
- resource-api
parameters:
- $ref: "./parameters.yaml#/components/parameters/dataStoreId"
summary: "Update a Data Store"
Expand All @@ -1174,32 +1127,7 @@ paths:
responses:
204:
description: successful operation
400:
description: "invalid data store, some data was sent in incorrect format."
500:
description: "problem with updating data store"
delete:
tags:
- api
parameters:
- $ref: "./parameters.yaml#/components/parameters/dataStoreId"
summary: "Delete a Data Store"
description: "Delete a Data Store"
operationId: deleteDataStore
responses:
"204":
description: OK
/datastores/{dataStoreId}/definition.yaml:
get:
tags:
- api
parameters:
- $ref: "./parameters.yaml#/components/parameters/dataStoreId"
summary: Get the data store definition as an YAML file
description: Get the data store as an YAML file
operationId: getDataStoreDefinitionFile
responses:
200:
description: OK
content:
application/yaml:
schema:
type: string

0 comments on commit ea05beb

Please sign in to comment.