From 4b119669084a74549d9f8126b9f045861ec91f3a Mon Sep 17 00:00:00 2001 From: ramiroaisen <52116153+ramiroaisen@users.noreply.github.com> Date: Mon, 15 Jan 2024 17:51:22 -0300 Subject: [PATCH] fix-minor-openapi-improvements --- .../GET/Output.schema.json | 0 .../GET/Output.ts | 0 .../count/GET/Output.schema.json | 0 .../count/GET/Output.ts | 0 .../GET/Output.schema.json | 0 .../GET/Output.ts | 0 .../count/GET/Output.schema.json | 0 .../count/GET/Output.ts | 0 .../GET/Output.schema.json | 0 .../GET/Output.ts | 0 .../count/GET/Output.schema.json | 0 .../count/GET/Output.ts | 0 front/server/src/client.ts | 12 +- openapi-generator.js | 12 +- openapi.json | 515 ++++++++---------- .../api/src/routes/accounts/stream_stats.rs | 4 +- .../api/src/routes/stations/stream_stats.rs | 4 +- .../api/src/routes/stream_stats/mod.rs | 4 +- 18 files changed, 247 insertions(+), 304 deletions(-) rename defs/api/accounts/[account]/stream-stats/{last-[num][unit] => [last-unitvalue]}/GET/Output.schema.json (100%) rename defs/api/accounts/[account]/stream-stats/{last-[num][unit] => [last-unitvalue]}/GET/Output.ts (100%) rename defs/api/accounts/[account]/stream-stats/{last-[num][unit] => [last-unitvalue]}/count/GET/Output.schema.json (100%) rename defs/api/accounts/[account]/stream-stats/{last-[num][unit] => [last-unitvalue]}/count/GET/Output.ts (100%) rename defs/api/stations/[station]/stream-stats/{last-[num][unit] => [last-unitvalue]}/GET/Output.schema.json (100%) rename defs/api/stations/[station]/stream-stats/{last-[num][unit] => [last-unitvalue]}/GET/Output.ts (100%) rename defs/api/stations/[station]/stream-stats/{last-[num][unit] => [last-unitvalue]}/count/GET/Output.schema.json (100%) rename defs/api/stations/[station]/stream-stats/{last-[num][unit] => [last-unitvalue]}/count/GET/Output.ts (100%) rename defs/api/stream-stats/{last-[num][unit] => [last-unitvalue]}/GET/Output.schema.json (100%) rename defs/api/stream-stats/{last-[num][unit] => [last-unitvalue]}/GET/Output.ts (100%) rename defs/api/stream-stats/{last-[num][unit] => [last-unitvalue]}/count/GET/Output.schema.json (100%) rename defs/api/stream-stats/{last-[num][unit] => [last-unitvalue]}/count/GET/Output.ts (100%) diff --git a/defs/api/accounts/[account]/stream-stats/last-[num][unit]/GET/Output.schema.json b/defs/api/accounts/[account]/stream-stats/[last-unitvalue]/GET/Output.schema.json similarity index 100% rename from defs/api/accounts/[account]/stream-stats/last-[num][unit]/GET/Output.schema.json rename to defs/api/accounts/[account]/stream-stats/[last-unitvalue]/GET/Output.schema.json diff --git a/defs/api/accounts/[account]/stream-stats/last-[num][unit]/GET/Output.ts b/defs/api/accounts/[account]/stream-stats/[last-unitvalue]/GET/Output.ts similarity index 100% rename from defs/api/accounts/[account]/stream-stats/last-[num][unit]/GET/Output.ts rename to defs/api/accounts/[account]/stream-stats/[last-unitvalue]/GET/Output.ts diff --git a/defs/api/accounts/[account]/stream-stats/last-[num][unit]/count/GET/Output.schema.json b/defs/api/accounts/[account]/stream-stats/[last-unitvalue]/count/GET/Output.schema.json similarity index 100% rename from defs/api/accounts/[account]/stream-stats/last-[num][unit]/count/GET/Output.schema.json rename to defs/api/accounts/[account]/stream-stats/[last-unitvalue]/count/GET/Output.schema.json diff --git a/defs/api/accounts/[account]/stream-stats/last-[num][unit]/count/GET/Output.ts b/defs/api/accounts/[account]/stream-stats/[last-unitvalue]/count/GET/Output.ts similarity index 100% rename from defs/api/accounts/[account]/stream-stats/last-[num][unit]/count/GET/Output.ts rename to defs/api/accounts/[account]/stream-stats/[last-unitvalue]/count/GET/Output.ts diff --git a/defs/api/stations/[station]/stream-stats/last-[num][unit]/GET/Output.schema.json b/defs/api/stations/[station]/stream-stats/[last-unitvalue]/GET/Output.schema.json similarity index 100% rename from defs/api/stations/[station]/stream-stats/last-[num][unit]/GET/Output.schema.json rename to defs/api/stations/[station]/stream-stats/[last-unitvalue]/GET/Output.schema.json diff --git a/defs/api/stations/[station]/stream-stats/last-[num][unit]/GET/Output.ts b/defs/api/stations/[station]/stream-stats/[last-unitvalue]/GET/Output.ts similarity index 100% rename from defs/api/stations/[station]/stream-stats/last-[num][unit]/GET/Output.ts rename to defs/api/stations/[station]/stream-stats/[last-unitvalue]/GET/Output.ts diff --git a/defs/api/stations/[station]/stream-stats/last-[num][unit]/count/GET/Output.schema.json b/defs/api/stations/[station]/stream-stats/[last-unitvalue]/count/GET/Output.schema.json similarity index 100% rename from defs/api/stations/[station]/stream-stats/last-[num][unit]/count/GET/Output.schema.json rename to defs/api/stations/[station]/stream-stats/[last-unitvalue]/count/GET/Output.schema.json diff --git a/defs/api/stations/[station]/stream-stats/last-[num][unit]/count/GET/Output.ts b/defs/api/stations/[station]/stream-stats/[last-unitvalue]/count/GET/Output.ts similarity index 100% rename from defs/api/stations/[station]/stream-stats/last-[num][unit]/count/GET/Output.ts rename to defs/api/stations/[station]/stream-stats/[last-unitvalue]/count/GET/Output.ts diff --git a/defs/api/stream-stats/last-[num][unit]/GET/Output.schema.json b/defs/api/stream-stats/[last-unitvalue]/GET/Output.schema.json similarity index 100% rename from defs/api/stream-stats/last-[num][unit]/GET/Output.schema.json rename to defs/api/stream-stats/[last-unitvalue]/GET/Output.schema.json diff --git a/defs/api/stream-stats/last-[num][unit]/GET/Output.ts b/defs/api/stream-stats/[last-unitvalue]/GET/Output.ts similarity index 100% rename from defs/api/stream-stats/last-[num][unit]/GET/Output.ts rename to defs/api/stream-stats/[last-unitvalue]/GET/Output.ts diff --git a/defs/api/stream-stats/last-[num][unit]/count/GET/Output.schema.json b/defs/api/stream-stats/[last-unitvalue]/count/GET/Output.schema.json similarity index 100% rename from defs/api/stream-stats/last-[num][unit]/count/GET/Output.schema.json rename to defs/api/stream-stats/[last-unitvalue]/count/GET/Output.schema.json diff --git a/defs/api/stream-stats/last-[num][unit]/count/GET/Output.ts b/defs/api/stream-stats/[last-unitvalue]/count/GET/Output.ts similarity index 100% rename from defs/api/stream-stats/last-[num][unit]/count/GET/Output.ts rename to defs/api/stream-stats/[last-unitvalue]/count/GET/Output.ts diff --git a/front/server/src/client.ts b/front/server/src/client.ts index dd1cb823..669894b1 100644 --- a/front/server/src/client.ts +++ b/front/server/src/client.ts @@ -170,11 +170,11 @@ export class Client { return await this.get(ip, ua, token, `/stream-stats/now/count-by-station`); } - async get_stream_stats_item_since(ip: string | null, ua: string | null, token: string, num: number | string, unit: string): Promise { + async get_stream_stats_item_since(ip: string | null, ua: string | null, token: string, num: number | string, unit: string): Promise { return await this.get(ip, ua, token, `/stream-stats/last-${num}${unit}`); } - async get_stream_stats_item_since_count(ip: string | null, ua: string | null, token: string, num: number | string, unit: string): Promise { + async get_stream_stats_item_since_count(ip: string | null, ua: string | null, token: string, num: number | string, unit: string): Promise { return await this.get(ip, ua, token, `/stream-stats/last-${num}${unit}/count`); } } @@ -404,11 +404,11 @@ export class Accounts { return await this.client.get(ip, ua, token, `/accounts/${account_id}/stream-stats/now/count-by-station`); } - async get_stream_stats_item_since(ip: string | null, ua: string | null, token: string, account_id: string, num: number | string, unit: string): Promise { + async get_stream_stats_item_since(ip: string | null, ua: string | null, token: string, account_id: string, num: number | string, unit: string): Promise { return await this.client.get(ip, ua, token, `/accounts/${account_id}/stream-stats/last-${num}${unit}`); } - async get_stream_stats_item_since_count(ip: string | null, ua: string | null, token: string, account_id: string, num: number | string, unit: string): Promise { + async get_stream_stats_item_since_count(ip: string | null, ua: string | null, token: string, account_id: string, num: number | string, unit: string): Promise { return await this.client.get(ip, ua, token, `/accounts/${account_id}/stream-stats/last-${num}${unit}/count`); } } @@ -463,11 +463,11 @@ export class Stations { return await this.client.get(ip, ua, token, `/stations/${id}/stream-stats/now/count`); } - async get_stream_stats_item_since(ip: string | null, ua: string | null, token: string, id: string, num: number | string, unit: string): Promise { + async get_stream_stats_item_since(ip: string | null, ua: string | null, token: string, id: string, num: number | string, unit: string): Promise { return await this.client.get(ip, ua, token, `/stations/${id}/stream-stats/last-${num}${unit}`); } - async get_stream_stats_item_since_count(ip: string | null, ua: string | null, token: string, id: string, num: number | string, unit: string): Promise { + async get_stream_stats_item_since_count(ip: string | null, ua: string | null, token: string, id: string, num: number | string, unit: string): Promise { return await this.client.get(ip, ua, token, `/stations/${id}/stream-stats/last-${num}${unit}/count`); } diff --git a/openapi-generator.js b/openapi-generator.js index 29f35af5..b8923cd2 100644 --- a/openapi-generator.js +++ b/openapi-generator.js @@ -107,7 +107,7 @@ const process_dir = (target) => { }, }, - "4xx": { + "4XX": { description: "A client error", content: { "application/json": { @@ -116,16 +116,16 @@ const process_dir = (target) => { } }, - "5xx": { + "5XX": { description: "A server error", content: { "application/json": { schema: { $ref: "#/components/schemas/Error" }, } } - } - }, - }; + }, + } + } } for (const name of filenames) { @@ -166,7 +166,7 @@ process_dir(null) const document = { - openapi: "3.0.0", + openapi: "3.0.3", info: { title: "Openstream Media Server API", diff --git a/openapi.json b/openapi.json index 15604da3..e7f15c2b 100644 --- a/openapi.json +++ b/openapi.json @@ -1,5 +1,5 @@ { - "openapi": "3.0.0", + "openapi": "3.0.3", "info": { "title": "Openstream Media Server API", "version": "0.1.0" @@ -383,7 +383,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -393,7 +393,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -737,7 +737,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -747,7 +747,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -1051,7 +1051,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -1061,7 +1061,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -1375,7 +1375,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -1385,7 +1385,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -1414,35 +1414,26 @@ "application/json": { "schema": { "type": "object", - "required": [ - "patch" - ], "properties": { - "patch": { + "name": { + "type": "string", + "maxLength": 60, + "minLength": 1, + "nullable": true + }, + "plan_id": { + "type": "string", + "nullable": true + }, + "user_metadata": { "type": "object", - "properties": { - "name": { - "type": "string", - "maxLength": 60, - "minLength": 1, - "nullable": true - }, - "plan_id": { - "type": "string", - "nullable": true - }, - "user_metadata": { - "type": "object", - "additionalProperties": true, - "nullable": true - }, - "system_metadata": { - "type": "object", - "additionalProperties": true, - "nullable": true - } - }, - "additionalProperties": false + "additionalProperties": true, + "nullable": true + }, + "system_metadata": { + "type": "object", + "additionalProperties": true, + "nullable": true } } } @@ -1728,7 +1719,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -1738,7 +1729,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -1813,7 +1804,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -1823,7 +1814,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -1867,7 +1858,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -1877,7 +1868,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -1943,7 +1934,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -1953,7 +1944,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -2085,7 +2076,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -2095,7 +2086,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -2108,7 +2099,7 @@ } } }, - "/accounts/{account}/stream-stats/last-{num}{unit}": { + "/accounts/{account}/stream-stats/{last-unitvalue}": { "get": { "parameters": [ { @@ -2120,15 +2111,7 @@ } }, { - "name": "num", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "unit", + "name": "last-unitvalue", "in": "path", "required": true, "schema": { @@ -2172,7 +2155,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -2182,7 +2165,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -2195,7 +2178,7 @@ } } }, - "/accounts/{account}/stream-stats/last-{num}{unit}/count": { + "/accounts/{account}/stream-stats/{last-unitvalue}/count": { "get": { "parameters": [ { @@ -2207,15 +2190,7 @@ } }, { - "name": "num", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "unit", + "name": "last-unitvalue", "in": "path", "required": true, "schema": { @@ -2244,7 +2219,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -2254,7 +2229,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -2315,7 +2290,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -2325,7 +2300,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -2371,7 +2346,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -2381,7 +2356,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -2430,7 +2405,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -2440,7 +2415,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -2580,7 +2555,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -2590,7 +2565,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -2707,7 +2682,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -2717,7 +2692,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -2801,7 +2776,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -2811,7 +2786,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -2914,7 +2889,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -2924,7 +2899,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -2984,7 +2959,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -2994,7 +2969,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -4219,7 +4194,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -4229,7 +4204,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -5397,7 +5372,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -5407,7 +5382,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -5532,7 +5507,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -5542,7 +5517,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -5652,7 +5627,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -5662,7 +5637,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -5689,7 +5664,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -5699,7 +5674,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -5745,7 +5720,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -5755,7 +5730,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -5799,7 +5774,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -5809,7 +5784,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -5927,7 +5902,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -5937,7 +5912,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -5964,7 +5939,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -5974,7 +5949,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -6020,7 +5995,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -6030,7 +6005,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -6119,7 +6094,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -6129,7 +6104,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -6197,7 +6172,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -6207,7 +6182,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -6725,7 +6700,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -6735,7 +6710,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -7064,7 +7039,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -7074,7 +7049,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -7312,7 +7287,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -7322,7 +7297,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -7358,7 +7333,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -7368,7 +7343,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -7591,7 +7566,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -7601,7 +7576,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -7812,7 +7787,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -7822,7 +7797,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -8072,7 +8047,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -8082,7 +8057,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -8213,7 +8188,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -8223,7 +8198,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -8449,7 +8424,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -8459,7 +8434,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -8617,7 +8592,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -8627,7 +8602,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -8726,7 +8701,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -8736,7 +8711,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -8772,7 +8747,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -8782,7 +8757,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -8834,7 +8809,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -8844,7 +8819,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -9042,7 +9017,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -9052,7 +9027,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -9088,7 +9063,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -9098,7 +9073,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -9269,7 +9244,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -9279,7 +9254,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -9397,7 +9372,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -9407,7 +9382,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -9510,7 +9485,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -9520,7 +9495,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -9705,7 +9680,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -9715,7 +9690,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -9897,7 +9872,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -9907,7 +9882,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -10036,7 +10011,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -10046,7 +10021,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -10173,7 +10148,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -10183,7 +10158,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -10371,7 +10346,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -10381,7 +10356,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -10510,7 +10485,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -10520,7 +10495,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -10556,7 +10531,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -10566,7 +10541,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -10602,7 +10577,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -10612,7 +10587,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -10648,7 +10623,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -10658,7 +10633,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -10694,7 +10669,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -10704,7 +10679,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -10853,7 +10828,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -10863,7 +10838,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -12270,7 +12245,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -12280,7 +12255,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -14235,7 +14210,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -14245,7 +14220,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -14281,7 +14256,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -14291,7 +14266,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -15628,7 +15603,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -15638,7 +15613,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -17591,7 +17566,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -17601,7 +17576,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -17809,7 +17784,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -17819,7 +17794,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -17977,7 +17952,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -17987,7 +17962,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -18136,7 +18111,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -18146,7 +18121,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -18301,7 +18276,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -18311,7 +18286,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -18521,7 +18496,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -18531,7 +18506,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -18602,7 +18577,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -18612,7 +18587,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -18683,7 +18658,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -18693,7 +18668,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -18746,7 +18721,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -18756,7 +18731,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -18809,7 +18784,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -18819,7 +18794,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -18881,7 +18856,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -18891,7 +18866,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -18927,7 +18902,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -18937,7 +18912,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -18973,7 +18948,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -18983,7 +18958,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -19116,7 +19091,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -19126,7 +19101,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -19170,7 +19145,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -19180,7 +19155,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -19216,7 +19191,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -19226,7 +19201,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -19358,7 +19333,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -19368,7 +19343,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -19381,7 +19356,7 @@ } } }, - "/stations/{station}/stream-stats/last-{num}{unit}": { + "/stations/{station}/stream-stats/{last-unitvalue}": { "get": { "parameters": [ { @@ -19393,15 +19368,7 @@ } }, { - "name": "num", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "unit", + "name": "last-unitvalue", "in": "path", "required": true, "schema": { @@ -19445,7 +19412,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -19455,7 +19422,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -19468,7 +19435,7 @@ } } }, - "/stations/{station}/stream-stats/last-{num}{unit}/count": { + "/stations/{station}/stream-stats/{last-unitvalue}/count": { "get": { "parameters": [ { @@ -19480,15 +19447,7 @@ } }, { - "name": "num", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "unit", + "name": "last-unitvalue", "in": "path", "required": true, "schema": { @@ -19517,7 +19476,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -19527,7 +19486,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -19588,7 +19547,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -19598,7 +19557,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -19644,7 +19603,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -19654,7 +19613,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -21011,7 +20970,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -21021,7 +20980,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -21894,7 +21853,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -21904,7 +21863,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -22027,7 +21986,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -22037,7 +21996,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -22050,19 +22009,11 @@ } } }, - "/stream-stats/last-{num}{unit}": { + "/stream-stats/{last-unitvalue}": { "get": { "parameters": [ { - "name": "num", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "unit", + "name": "last-unitvalue", "in": "path", "required": true, "schema": { @@ -22106,7 +22057,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -22116,7 +22067,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -22129,19 +22080,11 @@ } } }, - "/stream-stats/last-{num}{unit}/count": { + "/stream-stats/{last-unitvalue}/count": { "get": { "parameters": [ { - "name": "num", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "unit", + "name": "last-unitvalue", "in": "path", "required": true, "schema": { @@ -22170,7 +22113,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -22180,7 +22123,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -22232,7 +22175,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -22242,7 +22185,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -22279,7 +22222,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -22289,7 +22232,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -22329,7 +22272,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -22339,7 +22282,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -22547,7 +22490,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -22557,7 +22500,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -22759,7 +22702,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -22769,7 +22712,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -22866,7 +22809,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -22876,7 +22819,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -23026,7 +22969,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -23036,7 +22979,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -23222,7 +23165,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -23232,7 +23175,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { @@ -23292,7 +23235,7 @@ } } }, - "4xx": { + "4XX": { "description": "A client error", "content": { "application/json": { @@ -23302,7 +23245,7 @@ } } }, - "5xx": { + "5XX": { "description": "A server error", "content": { "application/json": { diff --git a/rs/packages/api/src/routes/accounts/stream_stats.rs b/rs/packages/api/src/routes/accounts/stream_stats.rs index f6cb3f7e..d4d9434e 100644 --- a/rs/packages/api/src/routes/accounts/stream_stats.rs +++ b/rs/packages/api/src/routes/accounts/stream_stats.rs @@ -386,7 +386,7 @@ pub mod since { #[derive(Debug, Clone, Serialize, Deserialize, TS, JsonSchema)] #[ts( export, - export_to = "../../../defs/api/accounts/[account]/stream-stats/last-[num][unit]/GET/" + export_to = "../../../defs/api/accounts/[account]/stream-stats/[last-unitvalue]/GET/" )] #[macros::schema_ts_export] pub struct Output { @@ -522,7 +522,7 @@ pub mod since { #[derive(Debug, Clone, Serialize, Deserialize, TS, JsonSchema)] #[ts( export, - export_to = "../../../defs/api/accounts/[account]/stream-stats/last-[num][unit]/count/GET/" + export_to = "../../../defs/api/accounts/[account]/stream-stats/[last-unitvalue]/count/GET/" )] #[macros::schema_ts_export] pub struct Output { diff --git a/rs/packages/api/src/routes/stations/stream_stats.rs b/rs/packages/api/src/routes/stations/stream_stats.rs index f234ec45..be8e5481 100644 --- a/rs/packages/api/src/routes/stations/stream_stats.rs +++ b/rs/packages/api/src/routes/stations/stream_stats.rs @@ -212,7 +212,7 @@ pub mod since { #[derive(Debug, Clone, Serialize, Deserialize, TS, JsonSchema)] #[ts( export, - export_to = "../../../defs/api/stations/[station]/stream-stats/last-[num][unit]/GET/" + export_to = "../../../defs/api/stations/[station]/stream-stats/[last-unitvalue]/GET/" )] #[macros::schema_ts_export] pub struct Output { @@ -313,7 +313,7 @@ pub mod since { #[derive(Debug, Clone, Serialize, Deserialize, TS, JsonSchema)] #[ts( export, - export_to = "../../../defs/api/stations/[station]/stream-stats/last-[num][unit]/count/GET/" + export_to = "../../../defs/api/stations/[station]/stream-stats/[last-unitvalue]/count/GET/" )] #[macros::schema_ts_export] pub struct Output { diff --git a/rs/packages/api/src/routes/stream_stats/mod.rs b/rs/packages/api/src/routes/stream_stats/mod.rs index 27f26bdf..e1651161 100644 --- a/rs/packages/api/src/routes/stream_stats/mod.rs +++ b/rs/packages/api/src/routes/stream_stats/mod.rs @@ -244,7 +244,7 @@ pub mod since { #[derive(Debug, Clone, Serialize, Deserialize, TS, JsonSchema)] #[ts( export, - export_to = "../../../defs/api/stream-stats/last-[num][unit]/GET/" + export_to = "../../../defs/api/stream-stats/[last-unitvalue]/GET/" )] #[macros::schema_ts_export] pub struct Output { @@ -338,7 +338,7 @@ pub mod since { #[derive(Debug, Clone, Serialize, Deserialize, TS, JsonSchema)] #[ts( export, - export_to = "../../../defs/api/stream-stats/last-[num][unit]/count/GET/" + export_to = "../../../defs/api/stream-stats/[last-unitvalue]/count/GET/" )] #[macros::schema_ts_export] pub struct Output {