Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,44 @@ partial void ProcessGetProjectResponseContent(
retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Bad request - `project_id` is not a valid UUID
if ((int)__response.StatusCode == 400)
{
string? __content_400 = null;
global::System.Exception? __exception_400 = null;
global::Descript.Error400? __value_400 = null;
try
{
if (__effectiveReadResponseAsString)
{
__content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_400 = global::Descript.Error400.FromJson(__content_400, JsonSerializerContext);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_400 = global::Descript.Error400.FromJson(__content_400, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
{
__exception_400 = __ex;
}

throw new global::Descript.ApiException<global::Descript.Error400>(
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_400,
statusCode: __response.StatusCode)
{
ResponseBody = __content_400,
ResponseObject = __value_400,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value),
};
}
// Unauthorized - invalid or missing authentication token
if ((int)__response.StatusCode == 401)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,44 @@ partial void ProcessListJobsResponseContent(
retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Bad request - `project_id` is not a valid UUID
if ((int)__response.StatusCode == 400)
{
string? __content_400 = null;
global::System.Exception? __exception_400 = null;
global::Descript.Error400? __value_400 = null;
try
{
if (__effectiveReadResponseAsString)
{
__content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_400 = global::Descript.Error400.FromJson(__content_400, JsonSerializerContext);
}
else
{
__content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_400 = global::Descript.Error400.FromJson(__content_400, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
{
__exception_400 = __ex;
}

throw new global::Descript.ApiException<global::Descript.Error400>(
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_400,
statusCode: __response.StatusCode)
{
ResponseBody = __content_400,
ResponseObject = __value_400,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value),
};
}
// Unauthorized - invalid or missing authentication token
if ((int)__response.StatusCode == 401)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Descript.JsonConverters
{
/// <inheritdoc />
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>>
public class OneOfJsonConverter<T1, T2, T3> : global::System.Text.Json.Serialization.JsonConverter<global::Descript.OneOf<T1, T2, T3>>
{
/// <inheritdoc />
public override global::Descript.OneOf<T1, T2, T3> Read(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ namespace Descript
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.GetProjectResponseComposition))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.GetStatusResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.GetStatusResponseStatus), TypeInfoPropertyName = "GetStatusResponseStatus2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.OneOf<global::Descript.ImportProjectMediaRequestAddMediaUrlImport, global::Descript.ImportProjectMediaRequestAddMediaDirectUpload, global::Descript.ImportProjectMediaRequestAddMediaMultitrackSequence>?), TypeInfoPropertyName = "ImportProjectMediaRequestAddMediaMultitrackSequence_a84f7d44496d84a5")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::Descript.EditInDescriptSchemaPostBodyProjectSchemaFile>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::Descript.ImportSuccessResultCreatedComposition>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::Descript.ImportProjectMediaRequestAddMediaMultitrackSequenceTrack>))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"Slug": "getproject",
"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.",
"Language": "http",
"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",
"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",
"Format": "http",
"OperationId": "getProject",
"Setup": null
Expand Down
16 changes: 14 additions & 2 deletions src/libs/Descript/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1243,6 +1243,12 @@ paths:
last_update_at: '2025-11-18T11:01:00Z'
pagination:
next_cursor: YTFiMmMzZDQtNTY3OC05MGFiLWNkZWYtMTIzNDU2Nzg5MGFi
'400':
description: Bad request - `project_id` is not a valid UUID
content:
application/json:
schema:
$ref: '#/components/schemas/Error400'
'401':
description: Unauthorized - invalid or missing authentication token
content:
Expand Down Expand Up @@ -1482,7 +1488,7 @@ paths:
summary: Job does not exist
value:
error: not_found
message: Job not found
message: No job found for job_id "6dc3f30a-58c2-4174-96a6-dc18cf3c7776".
'429':
$ref: '#/components/responses/Error429Response'
delete:
Expand Down Expand Up @@ -1540,7 +1546,7 @@ paths:
summary: Job does not exist
value:
error: not_found
message: Job not found
message: No job found for job_id "6dc3f30a-58c2-4174-96a6-dc18cf3c7776".
'429':
$ref: '#/components/responses/Error429Response'
/projects:
Expand Down Expand Up @@ -1807,6 +1813,12 @@ paths:
media_type:
type: string
description: Media type of the composition
'400':
description: Bad request - `project_id` is not a valid UUID
content:
application/json:
schema:
$ref: '#/components/schemas/Error400'
'401':
description: Unauthorized - invalid or missing authentication token
content:
Expand Down