Skip to content

Commit d8c9c5c

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

3 files changed

Lines changed: 32 additions & 6 deletions

File tree

src/libs/DeepL/Generated/DeepL.Models.CustomTagUsageItem.g.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ public sealed partial class CustomTagUsageItem
1616
[global::System.Text.Json.Serialization.JsonPropertyName("custom_tag")]
1717
public string? CustomTag { get; set; }
1818

19+
/// <summary>
20+
/// The day the usage was recorded. Only returned when `aggregate_by` is `day`.<br/>
21+
/// Example: 2026-05-04T00:00:00Z
22+
/// </summary>
23+
/// <example>2026-05-04T00:00:00Z</example>
24+
[global::System.Text.Json.Serialization.JsonPropertyName("usage_date")]
25+
public global::System.DateTime? UsageDate { get; set; }
26+
1927
/// <summary>
2028
/// Breakdown of character usage by category for a custom tag.
2129
/// </summary>
@@ -35,6 +43,10 @@ public sealed partial class CustomTagUsageItem
3543
/// The custom tag identifier.<br/>
3644
/// Example: example-custom-tag
3745
/// </param>
46+
/// <param name="usageDate">
47+
/// The day the usage was recorded. Only returned when `aggregate_by` is `day`.<br/>
48+
/// Example: 2026-05-04T00:00:00Z
49+
/// </param>
3850
/// <param name="breakdown">
3951
/// Breakdown of character usage by category for a custom tag.
4052
/// </param>
@@ -43,9 +55,11 @@ public sealed partial class CustomTagUsageItem
4355
#endif
4456
public CustomTagUsageItem(
4557
string? customTag,
58+
global::System.DateTime? usageDate,
4659
global::DeepL.CustomTagBreakdown? breakdown)
4760
{
4861
this.CustomTag = customTag;
62+
this.UsageDate = usageDate;
4963
this.Breakdown = breakdown;
5064
}
5165

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"Slug": "admingetcustomtaganalytics",
5151
"Description": "Retrieve usage statistics broken down by custom tags within a specified date range.\nOptionally aggregate results by day or over the entire period.\nResults are paginated; use the \u0060page\u0060 parameter with the \u0060next_page\u0060 value from\na previous response to retrieve subsequent pages.",
5252
"Language": "csharp",
53-
"Code": "using var client = new DeepLClient(apiKey);\n\nvar response = await client.AdminApi.AdminGetCustomTagAnalyticsAsync(\n startDate: global::System.Text.Json.JsonSerializer.Deserialize\u003Cglobal::System.DateTime\u003E(\n @\u0022\u0022\u00222026-05-17\u0022\u0022\u0022)!,\n endDate: global::System.Text.Json.JsonSerializer.Deserialize\u003Cglobal::System.DateTime\u003E(\n @\u0022\u0022\u00222026-05-18\u0022\u0022\u0022)!,\n aggregateBy: global::DeepL.AdminGetCustomTagAnalyticsAggregateBy.Day,\n page: 2\n);\n\n// Example response:\n// {\n// \u0022custom_tag_usage_report\u0022: {\n// \u0022aggregate_by\u0022: \u0022day\u0022,\n// \u0022start_date\u0022: \u00222026-05-17T00:00:00\u0022,\n// \u0022end_date\u0022: \u00222026-05-18T00:00:00\u0022,\n// \u0022next_page\u0022: 2,\n// \u0022usage\u0022: [\n// {\n// \u0022custom_tag\u0022: \u0022example-custom-tag\u0022,\n// \u0022breakdown\u0022: {\n// \u0022total_characters\u0022: 190,\n// \u0022text_translation_characters\u0022: 190,\n// \u0022text_improvement_characters\u0022: 0\n// }\n// }\n// ]\n// }\n// }",
53+
"Code": "using var client = new DeepLClient(apiKey);\n\nvar response = await client.AdminApi.AdminGetCustomTagAnalyticsAsync(\n startDate: global::System.Text.Json.JsonSerializer.Deserialize\u003Cglobal::System.DateTime\u003E(\n @\u0022\u0022\u00222026-05-17\u0022\u0022\u0022)!,\n endDate: global::System.Text.Json.JsonSerializer.Deserialize\u003Cglobal::System.DateTime\u003E(\n @\u0022\u0022\u00222026-05-18\u0022\u0022\u0022)!,\n aggregateBy: global::DeepL.AdminGetCustomTagAnalyticsAggregateBy.Day,\n page: 2\n);\n\n// Example response:\n// {\n// \u0022custom_tag_usage_report\u0022: {\n// \u0022aggregate_by\u0022: \u0022day\u0022,\n// \u0022start_date\u0022: \u00222026-05-03T00:00:00\u0022,\n// \u0022end_date\u0022: \u00222026-05-15T00:00:00\u0022,\n// \u0022next_page\u0022: \u0022openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464\u0022,\n// \u0022usage\u0022: [\n// {\n// \u0022custom_tag\u0022: \u0022example-custom-tag\u0022,\n// \u0022usage_date\u0022: \u00222026-05-04T00:00:00Z\u0022,\n// \u0022breakdown\u0022: {\n// \u0022total_characters\u0022: 380,\n// \u0022text_translation_characters\u0022: 380,\n// \u0022text_improvement_characters\u0022: 0\n// }\n// },\n// {\n// \u0022custom_tag\u0022: \u0022example-custom-tag\u0022,\n// \u0022usage_date\u0022: \u00222026-05-11T00:00:00Z\u0022,\n// \u0022breakdown\u0022: {\n// \u0022total_characters\u0022: 595,\n// \u0022text_translation_characters\u0022: 595,\n// \u0022text_improvement_characters\u0022: 0\n// }\n// }\n// ]\n// }\n// }",
5454
"Format": "sdk",
5555
"OperationId": "adminGetCustomTagAnalytics",
5656
"Setup": "This example assumes \u0060using DeepL;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential."

src/libs/DeepL/openapi.yaml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -293,14 +293,21 @@ paths:
293293
value:
294294
custom_tag_usage_report:
295295
aggregate_by: "day"
296-
start_date: "2026-05-17T00:00:00"
297-
end_date: "2026-05-18T00:00:00"
298-
next_page: 2
296+
start_date: "2026-05-03T00:00:00"
297+
end_date: "2026-05-15T00:00:00"
298+
next_page: null
299299
usage:
300300
- custom_tag: "example-custom-tag"
301+
usage_date: "2026-05-04T00:00:00Z"
302+
breakdown:
303+
total_characters: 380
304+
text_translation_characters: 380
305+
text_improvement_characters: 0
306+
- custom_tag: "example-custom-tag"
307+
usage_date: "2026-05-11T00:00:00Z"
301308
breakdown:
302-
total_characters: 190
303-
text_translation_characters: 190
309+
total_characters: 595
310+
text_translation_characters: 595
304311
text_improvement_characters: 0
305312
400:
306313
description: Bad request. Please check error message and your parameters.
@@ -5695,6 +5702,11 @@ components:
56955702
type: string
56965703
description: The custom tag identifier.
56975704
example: "example-custom-tag"
5705+
usage_date:
5706+
type: string
5707+
format: date-time
5708+
description: The day the usage was recorded. Only returned when `aggregate_by` is `day`.
5709+
example: "2026-05-04T00:00:00Z"
56985710
breakdown:
56995711
$ref: '#/components/schemas/CustomTagBreakdown'
57005712
CustomTagBreakdown:

0 commit comments

Comments
 (0)