Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: new tests openapi spec #2658

Merged
merged 1 commit into from
Jun 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ paths:
/tests:
get:
tags:
- api
- resource-api
summary: "Get tests"
description: "get tests"
operationId: getTests
Expand All @@ -318,17 +318,15 @@ paths:
responses:
200:
description: successful operation
headers:
X-Total-Count:
schema:
type: integer
description: Total records count
content:
application/json:
schema:
type: array
items:
$ref: "./tests.yaml#/components/schemas/Test"
$ref: "./tests.yaml#/components/schemas/TestResourceList"
text/yaml:
schema:
$ref: "./tests.yaml#/components/schemas/TestResourceList"
400:
description: "invalid query for test, some data was sent in incorrect format."
500:
description: "problem with getting tests"
post:
Expand Down
23 changes: 23 additions & 0 deletions api/tests.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
openapi: 3.0.0
components:
schemas:

TestResourceList:
type: object
properties:
count:
type: integer
items:
type: array
items:
$ref: "#/components/schemas/TestResource"

TestResource:
type: object
description: "Represents a test structured into the Resources format."
properties:
type:
type: string
description: "Represents the type of this resource. It should always be set as 'Test'."
enum:
- Test
spec:
$ref: "#/components/schemas/Test"

Test:
type: object
properties:
Expand Down
Loading