Skip to content

Commit

Permalink
api/schema: Fix deletion of security field from pulled AI schema (#2311)
Browse files Browse the repository at this point in the history
* add tag

* Remove security schem

* api/schema: fix deletion of security field
  • Loading branch information
victorges authored Sep 17, 2024
1 parent bb26aab commit 0d13250
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
12 changes: 0 additions & 12 deletions packages/api/src/schema/ai-api-schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/studio-api-error'
security:
- HTTPBearer: []
x-speakeasy-name-override: textToImage
/api/beta/generate/image-to-image:
post:
Expand Down Expand Up @@ -121,8 +119,6 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/studio-api-error'
security:
- HTTPBearer: []
x-speakeasy-name-override: imageToImage
/api/beta/generate/image-to-video:
post:
Expand Down Expand Up @@ -183,8 +179,6 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/studio-api-error'
security:
- HTTPBearer: []
x-speakeasy-name-override: imageToVideo
/api/beta/generate/upscale:
post:
Expand Down Expand Up @@ -245,8 +239,6 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/studio-api-error'
security:
- HTTPBearer: []
x-speakeasy-name-override: upscale
/api/beta/generate/audio-to-text:
post:
Expand Down Expand Up @@ -315,8 +307,6 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/studio-api-error'
security:
- HTTPBearer: []
x-speakeasy-name-override: audioToText
/api/beta/generate/segment-anything-2:
post:
Expand Down Expand Up @@ -377,8 +367,6 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/studio-api-error'
security:
- HTTPBearer: []
x-speakeasy-name-override: segmentAnything2
components:
schemas:
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/schema/pull-ai-schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const downloadAiSchema = async () => {
// prefix paths with /api/beta/generate
path = `/api/beta/generate${path}`;
// remove security field
delete value.security;
delete value.post.security;
// add Studio API error as oneOf to all of the error responses
const studioErrorRef = () => ({
$ref: "#/components/schemas/studio-api-error",
Expand Down

0 comments on commit 0d13250

Please sign in to comment.