Skip to content
Source
Sign inSign up
TanStack/schemas

Drop OpenAI's Sora examples from the Lovable video operation (#680) #681

Mergedtombeckenhammerged 1 commit intomain fromrefs/pull/681/headmerged by tombeckenham View on GitHub

Showing 2 changed files with 59 additions and 11 deletions.

x
0 of 2 viewed, 2 left
24 additions and 0 deletionssrc/server/providers/lovable-video.test.tsModified
View file
@@ -20,6 +20,17 @@
'/videos': {
post: {
summary: 'Create a video',
+ // The live OpenAI operation carries its own examples (#680).
+ 'x-oaiMeta': {
+ name: 'Create video',
+ examples: {
+ request: {
+ curl: 'curl https://api.openai.com/v1/videos \\\n -H "Authorization: Bearer $OPENAI_API_KEY" \\\n -F "model=sora-2" \\\n -F "prompt=A calico cat playing a piano on stage"\n',
+ },
+ response:
+ '{\n "id": "video_123",\n "object": "video",\n "model": "sora-2",\n "size": "1024x1792",\n "seconds": "8"\n}\n',
+ },
+ },
requestBody: {
content: {
'multipart/form-data': {
@@ -250,6 +261,19 @@
).toBe(true)
​
+ it('drops the OpenAI examples and names the path of any Sora text left', () => {
+ const { spec } = bundledInput()
+ expect(JSON.stringify(spec.paths?.['/videos']?.post)).not.toMatch(/sora/i)