Skip to content

Commit

Permalink
fix(resource/all_projects_epike_protection): migrate to openapi clien…
Browse files Browse the repository at this point in the history
…t and enumerate all projects (#550)
  • Loading branch information
jianyuan authored Dec 25, 2024
1 parent 8cbd7bd commit 667299b
Show file tree
Hide file tree
Showing 3 changed files with 606 additions and 57 deletions.
84 changes: 84 additions & 0 deletions internal/apiclient/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,90 @@ paths:
description: Forbidden
"404":
description: Not Found
/0/organizations/{organization_id_or_slug}/projects/:
parameters:
- $ref: "#/components/parameters/organization_id_or_slug"
- $ref: "#/components/parameters/cursor"
- name: options
in: query
required: false
schema:
type: array
items:
type: string
style: form
explode: true
get:
summary: List Organization Projects
operationId: listOrganizationProjects
responses:
"200":
description: OK
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Project"
"401":
description: Unauthorized
"403":
description: Forbidden
"404":
description: Not Found
/0/organizations/{organization_id_or_slug}/spike-protections/:
parameters:
- $ref: "#/components/parameters/organization_id_or_slug"
post:
summary: Enable Spike Protection
operationId: enableSpikeProtection
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- projects
properties:
projects:
type: array
items:
type: string
responses:
"201":
description: Created
"400":
description: Bad Request
"403":
description: Forbidden
"404":
description: Not Found
delete:
summary: Disable Spike Protection
operationId: disableSpikeProtection
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- projects
properties:
projects:
type: array
items:
type: string
responses:
"200":
description: OK
"400":
description: Bad Request
"403":
description: Forbidden
"404":
description: Not Found
/0/teams/{organization_id_or_slug}/{team_id_or_slug}/projects/:
parameters:
- $ref: "#/components/parameters/organization_id_or_slug"
Expand Down
Loading

0 comments on commit 667299b

Please sign in to comment.