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

chore: Add npm test step CI #465

Merged
merged 2 commits into from
Oct 10, 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
18 changes: 18 additions & 0 deletions .github/workflows/openapi-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: OpenAPI Test

on:
pull_request:

jobs:
npm-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: Test
run: |
npm install -g @apidevtools/swagger-cli
npm install -g @stoplight/spectral
npm run test
3 changes: 1 addition & 2 deletions src/schemas/ClusterRequest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ properties:
example: "T3A_LARGE"
description: the instance type to be used for this cluster. The list of values can be retrieved via the endpoint /{CloudProvider}/instanceType
kubernetes:
$ref: ./enums/Kubernetes.yaml
default: "MANAGED"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put the default to Kubernetes.yaml

$ref: './enums/Kubernetes.yaml'
production:
type: boolean
description: specific flag to indicate that this cluster is a production one
Expand Down
3 changes: 1 addition & 2 deletions src/schemas/ClusterResponse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ allOf:
example: "T3A_LARGE"
description: the instance type to be used for this cluster. The list of values can be retrieved via the endpoint /{CloudProvider}/instanceType
kubernetes:
$ref: ./enums/Kubernetes.yaml
default: "MANAGED"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put the default to Kubernetes.yaml

$ref: './enums/Kubernetes.yaml'
cpu:
type: integer
example: 10000
Expand Down
1 change: 1 addition & 0 deletions src/schemas/CommitResponse.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
type: object
nullable: true
required:
- git_commit_id
- created_at
Expand Down
3 changes: 0 additions & 3 deletions src/schemas/EnvironmentVariableResponse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,10 @@ allOf:
service_id:
type: string
format: uuid
description: present only for `BUILT_IN` variable
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This description is no longer true

service_name:
type: string
description: present only for `BUILT_IN` variable
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This description is no longer true

service_type:
$ref: './enums/LinkedServiceType.yaml'
description: present only for `BUILT_IN` variable
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This description is no longer true

owned_by:
type: string
description: "Entity that created/own the variable (i.e: Qovery, Doppler)"
2 changes: 0 additions & 2 deletions src/schemas/Healthcheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@ nullable: false
properties:
readiness_probe:
$ref: './Probe.yaml'
nullable: true
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ We need to check if it breaks something

liveness_probe:
$ref: './Probe.yaml'
nullable: true
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ We need to check if it breaks something

1 change: 0 additions & 1 deletion src/schemas/InviteMemberRequest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ properties:
type: string
role:
$ref: './enums/InviteMemberRole.yaml'
description: deprecated
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Description already in the InviteMemberRole.yaml

role_id:
type: string
format: uuid
Expand Down
1 change: 0 additions & 1 deletion src/schemas/InviteMemberResponse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
format: email
role:
$ref: './enums/InviteMemberRole.yaml'
description: deprecated
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Description already in the InviteMemberRole.yaml

invitation_link:
type: string
format: uri
Expand Down
1 change: 0 additions & 1 deletion src/schemas/MemberResponse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ allOf:
description: last time the user was connected
role:
$ref: './enums/InviteMemberRole.yaml'
description: deprecated
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Description already in the InviteMemberRole.yaml

role_name:
type: string
description: the role linked to the user
Expand Down
4 changes: 0 additions & 4 deletions src/schemas/OrganizationEventResponse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,12 @@ properties:
target_name:
type: string
target_type:
type: string
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type already in the OrganizationEventTargetType.yaml

$ref: './enums/OrganizationEventTargetType.yaml'
sub_target_type:
type: string
Copy link
Author

@ghost ghost Oct 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type already in the OrganizationEventSubTargetType.yaml

nullable: true
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ We need to check if it breaks something

$ref: './enums/OrganizationEventSubTargetType.yaml'
change:
type: string
origin:
type: string
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type already in the OrganizationEventOrigin.yaml

$ref: './enums/OrganizationEventOrigin.yaml'
triggered_by:
type: string
Expand Down
1 change: 1 addition & 0 deletions src/schemas/Probe.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
type: object
nullable: true
properties:
type:
type: object
Expand Down
3 changes: 0 additions & 3 deletions src/schemas/SecretResponse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,10 @@ allOf:
service_id:
type: string
format: uuid
description: present only for `BUILT_IN` variable
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This description is no longer true

service_name:
type: string
description: present only for `BUILT_IN` variable
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This description is no longer true

service_type:
$ref: './enums/LinkedServiceType.yaml'
description: present only for `BUILT_IN` variable
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This description is no longer true

owned_by:
type: string
description: "Entity that created/own the variable (i.e: Qovery, Doppler)"
3 changes: 2 additions & 1 deletion src/schemas/enums/Kubernetes.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
type: string
enum:
- "K3S"
- "MANAGED"
- "MANAGED"
default: "MANAGED"
4 changes: 1 addition & 3 deletions src/schemas/enums/LinkedServiceType.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
type: string
description: |
type of the service (application, database, job, gateway...)
present only for `BUILT_IN` variable
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This description is no longer true

description: type of the service (application, database, job, gateway...)
enum:
- APPLICATION
- CONTAINER
Expand Down
1 change: 1 addition & 0 deletions src/schemas/enums/OrganizationEventSubTargetType.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
type: string
description: Type of the organization event
nullable: true
enum:
- ADVANCED_SETTINGS
- API_TOKEN
Expand Down
1 change: 0 additions & 1 deletion src/schemas/job/DeploymentHistoryJobResponse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ allOf:
type: string
commit:
$ref: '../CommitResponse.yaml'
nullable: true
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ We need to check if it breaks something

schedule:
type: object
properties:
Expand Down
5 changes: 2 additions & 3 deletions src/schemas/variable/VariableResponse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@ allOf:
service_id:
type: string
format: uuid
description: The id of the service referenced by this variable. present only for `BUILT_IN` variable
description: The id of the service referenced by this variable.
service_name:
type: string
description: The name of the service referenced by this variable. present only for `BUILT_IN` variable
description: The name of the service referenced by this variable.
service_type:
$ref: '../enums/LinkedServiceType.yaml'
description: present only for `BUILT_IN` variable
owned_by:
type: string
description: "Entity that created/own the variable (i.e: Qovery, Doppler)"
Loading