Skip to content

Commit 0208ec8

Browse files
HavenDVgithub-actions[bot]
andauthored
feat: Updated OpenAPI spec (#35)
Co-authored-by: github-actions[bot] <dependabot@bot.com>
1 parent ce1eb1f commit 0208ec8

6 files changed

Lines changed: 93 additions & 4 deletions

src/libs/Descript/Generated/Descript.ApiEndpointsClient.GetProject.g.cs

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,44 @@ partial void ProcessGetProjectResponseContent(
334334
retryReason: global::System.String.Empty,
335335
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
336336
}
337+
// Bad request - `project_id` is not a valid UUID
338+
if ((int)__response.StatusCode == 400)
339+
{
340+
string? __content_400 = null;
341+
global::System.Exception? __exception_400 = null;
342+
global::Descript.Error400? __value_400 = null;
343+
try
344+
{
345+
if (__effectiveReadResponseAsString)
346+
{
347+
__content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
348+
__value_400 = global::Descript.Error400.FromJson(__content_400, JsonSerializerContext);
349+
}
350+
else
351+
{
352+
__content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
353+
354+
__value_400 = global::Descript.Error400.FromJson(__content_400, JsonSerializerContext);
355+
}
356+
}
357+
catch (global::System.Exception __ex)
358+
{
359+
__exception_400 = __ex;
360+
}
361+
362+
throw new global::Descript.ApiException<global::Descript.Error400>(
363+
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
364+
innerException: __exception_400,
365+
statusCode: __response.StatusCode)
366+
{
367+
ResponseBody = __content_400,
368+
ResponseObject = __value_400,
369+
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
370+
__response.Headers,
371+
h => h.Key,
372+
h => h.Value),
373+
};
374+
}
337375
// Unauthorized - invalid or missing authentication token
338376
if ((int)__response.StatusCode == 401)
339377
{

src/libs/Descript/Generated/Descript.ApiEndpointsClient.ListJobs.g.cs

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,44 @@ partial void ProcessListJobsResponseContent(
397397
retryReason: global::System.String.Empty,
398398
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
399399
}
400+
// Bad request - `project_id` is not a valid UUID
401+
if ((int)__response.StatusCode == 400)
402+
{
403+
string? __content_400 = null;
404+
global::System.Exception? __exception_400 = null;
405+
global::Descript.Error400? __value_400 = null;
406+
try
407+
{
408+
if (__effectiveReadResponseAsString)
409+
{
410+
__content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
411+
__value_400 = global::Descript.Error400.FromJson(__content_400, JsonSerializerContext);
412+
}
413+
else
414+
{
415+
__content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
416+
417+
__value_400 = global::Descript.Error400.FromJson(__content_400, JsonSerializerContext);
418+
}
419+
}
420+
catch (global::System.Exception __ex)
421+
{
422+
__exception_400 = __ex;
423+
}
424+
425+
throw new global::Descript.ApiException<global::Descript.Error400>(
426+
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
427+
innerException: __exception_400,
428+
statusCode: __response.StatusCode)
429+
{
430+
ResponseBody = __content_400,
431+
ResponseObject = __value_400,
432+
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
433+
__response.Headers,
434+
h => h.Key,
435+
h => h.Value),
436+
};
437+
}
400438
// Unauthorized - invalid or missing authentication token
401439
if ((int)__response.StatusCode == 401)
402440
{

src/libs/Descript/Generated/Descript.JsonConverters.OneOf3.g.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace Descript.JsonConverters
44
{
55
/// <inheritdoc />
6-
public class OneOfJsonConverter<[global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T1, [global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T2, [global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] T3> : global::System.Text.Json.Serialization.JsonConverter<global::Descript.OneOf<T1, T2, T3>>
6+
public class OneOfJsonConverter<T1, T2, T3> : global::System.Text.Json.Serialization.JsonConverter<global::Descript.OneOf<T1, T2, T3>>
77
{
88
/// <inheritdoc />
99
public override global::Descript.OneOf<T1, T2, T3> Read(

src/libs/Descript/Generated/Descript.JsonSerializerContext.g.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ namespace Descript
278278
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.GetProjectResponseComposition))]
279279
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.GetStatusResponse))]
280280
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.GetStatusResponseStatus), TypeInfoPropertyName = "GetStatusResponseStatus2")]
281+
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.OneOf<global::Descript.ImportProjectMediaRequestAddMediaUrlImport, global::Descript.ImportProjectMediaRequestAddMediaDirectUpload, global::Descript.ImportProjectMediaRequestAddMediaMultitrackSequence>?), TypeInfoPropertyName = "ImportProjectMediaRequestAddMediaMultitrackSequence_a84f7d44496d84a5")]
281282
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::Descript.EditInDescriptSchemaPostBodyProjectSchemaFile>))]
282283
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::Descript.ImportSuccessResultCreatedComposition>))]
283284
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::Descript.ImportProjectMediaRequestAddMediaMultitrackSequenceTrack>))]

src/libs/Descript/Generated/autosdk.generated-examples.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"Slug": "getproject",
4040
"Description": "Get a detailed project summary including all media files and compositions.\n\nReturns the project\u0027s id, name, drive_id, a map of media files (keyed by\ndisplay path) with type and duration, and a list of compositions with id,\nname, duration, and media type.\n\nUse this to inspect a project\u0027s contents before editing or importing media.",
4141
"Language": "http",
42-
"Code": "### Get project details\n# @name getProject\nGET {{host}}/projects/{{project_id}}\nAuthorization: Bearer {{token}}\nAccept: application/json\n\n## Responses\n# 200\n# Description: Project details retrieved successfully\n# Content-Type: application/json\n# 401\n# Description: Unauthorized - invalid or missing authentication token\n# Content-Type: application/json\n# 403\n# Description: Forbidden - user does not have access to this project\n# Content-Type: application/json\n# 404\n# Description: Project not found\n# Content-Type: application/json\n# 429\n# Description: Too many requests - rate limit exceeded.\nUse the \u0060Retry-After\u0060 header to determine when to retry.\n\n# Content-Type: application/json",
42+
"Code": "### Get project details\n# @name getProject\nGET {{host}}/projects/{{project_id}}\nAuthorization: Bearer {{token}}\nAccept: application/json\n\n## Responses\n# 200\n# Description: Project details retrieved successfully\n# Content-Type: application/json\n# 400\n# Description: Bad request - \u0060project_id\u0060 is not a valid UUID\n# Content-Type: application/json\n# 401\n# Description: Unauthorized - invalid or missing authentication token\n# Content-Type: application/json\n# 403\n# Description: Forbidden - user does not have access to this project\n# Content-Type: application/json\n# 404\n# Description: Project not found\n# Content-Type: application/json\n# 429\n# Description: Too many requests - rate limit exceeded.\nUse the \u0060Retry-After\u0060 header to determine when to retry.\n\n# Content-Type: application/json",
4343
"Format": "http",
4444
"OperationId": "getProject",
4545
"Setup": null

src/libs/Descript/openapi.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,6 +1243,12 @@ paths:
12431243
last_update_at: '2025-11-18T11:01:00Z'
12441244
pagination:
12451245
next_cursor: YTFiMmMzZDQtNTY3OC05MGFiLWNkZWYtMTIzNDU2Nzg5MGFi
1246+
'400':
1247+
description: Bad request - `project_id` is not a valid UUID
1248+
content:
1249+
application/json:
1250+
schema:
1251+
$ref: '#/components/schemas/Error400'
12461252
'401':
12471253
description: Unauthorized - invalid or missing authentication token
12481254
content:
@@ -1482,7 +1488,7 @@ paths:
14821488
summary: Job does not exist
14831489
value:
14841490
error: not_found
1485-
message: Job not found
1491+
message: No job found for job_id "6dc3f30a-58c2-4174-96a6-dc18cf3c7776".
14861492
'429':
14871493
$ref: '#/components/responses/Error429Response'
14881494
delete:
@@ -1540,7 +1546,7 @@ paths:
15401546
summary: Job does not exist
15411547
value:
15421548
error: not_found
1543-
message: Job not found
1549+
message: No job found for job_id "6dc3f30a-58c2-4174-96a6-dc18cf3c7776".
15441550
'429':
15451551
$ref: '#/components/responses/Error429Response'
15461552
/projects:
@@ -1807,6 +1813,12 @@ paths:
18071813
media_type:
18081814
type: string
18091815
description: Media type of the composition
1816+
'400':
1817+
description: Bad request - `project_id` is not a valid UUID
1818+
content:
1819+
application/json:
1820+
schema:
1821+
$ref: '#/components/schemas/Error400'
18101822
'401':
18111823
description: Unauthorized - invalid or missing authentication token
18121824
content:

0 commit comments

Comments
 (0)