Skip to content

Commit 6960421

Browse files
committed
Fix resource config typing for resource types without special config
1 parent 8677d88 commit 6960421

File tree

3 files changed

+13
-35
lines changed

3 files changed

+13
-35
lines changed

Tekst-API/openapi.json

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8982,14 +8982,8 @@
89828982
}
89838983
},
89848984
"special": {
8985-
"anyOf": [
8986-
{
8987-
"$ref": "#/components/schemas/ModelBase"
8988-
},
8989-
{
8990-
"type": "null"
8991-
}
8992-
]
8985+
"type": "null",
8986+
"title": "Special"
89938987
}
89948988
},
89958989
"type": "object",
@@ -10931,14 +10925,8 @@
1093110925
}
1093210926
},
1093310927
"special": {
10934-
"anyOf": [
10935-
{
10936-
"$ref": "#/components/schemas/ModelBase"
10937-
},
10938-
{
10939-
"type": "null"
10940-
}
10941-
]
10928+
"type": "null",
10929+
"title": "Special"
1094210930
}
1094310931
},
1094410932
"type": "object",
@@ -12077,14 +12065,8 @@
1207712065
}
1207812066
},
1207912067
"special": {
12080-
"anyOf": [
12081-
{
12082-
"$ref": "#/components/schemas/ModelBase"
12083-
},
12084-
{
12085-
"type": "null"
12086-
}
12087-
]
12068+
"type": "null",
12069+
"title": "Special"
1208812070
}
1208912071
},
1209012072
"type": "object",
@@ -14496,11 +14478,6 @@
1449614478
],
1449714479
"title": "MetadataEntry"
1449814480
},
14499-
"ModelBase": {
14500-
"properties": {},
14501-
"type": "object",
14502-
"title": "ModelBase"
14503-
},
1450414481
"MoveLocationRequestBody": {
1450514482
"properties": {
1450614483
"position": {

Tekst-API/tekst/models/resource_configs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class GeneralResourceConfig(ModelBase):
9090

9191
class ResourceConfigBase(ModelBase):
9292
general: GeneralResourceConfig = GeneralResourceConfig()
93-
special: ModelBase | None = None
93+
special: None = None
9494

9595

9696
# GENERIC RESOURCE CONFIG: ITEM DISPLAY (ORDER, GROUPING AND TRANSLATIONS)

Tekst-Web/src/api/schema.d.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1971,7 +1971,8 @@ export interface components {
19711971
* }
19721972
*/
19731973
general: components['schemas']['GeneralResourceConfig'];
1974-
special?: components['schemas']['ModelBase'] | null;
1974+
/** Special */
1975+
special?: null;
19751976
};
19761977
/** AudioResourceCreate */
19771978
AudioResourceCreate: {
@@ -2872,7 +2873,8 @@ export interface components {
28722873
* }
28732874
*/
28742875
general: components['schemas']['GeneralResourceConfig'];
2875-
special?: components['schemas']['ModelBase'] | null;
2876+
/** Special */
2877+
special?: null;
28762878
};
28772879
/** ExternalReferencesResourceCreate */
28782880
ExternalReferencesResourceCreate: {
@@ -3401,7 +3403,8 @@ export interface components {
34013403
* }
34023404
*/
34033405
general: components['schemas']['GeneralResourceConfig'];
3404-
special?: components['schemas']['ModelBase'] | null;
3406+
/** Special */
3407+
special?: null;
34053408
};
34063409
/** ImagesResourceCreate */
34073410
ImagesResourceCreate: {
@@ -4499,8 +4502,6 @@ export interface components {
44994502
*/
45004503
value: string;
45014504
};
4502-
/** ModelBase */
4503-
ModelBase: Record<string, never>;
45044505
/** MoveLocationRequestBody */
45054506
MoveLocationRequestBody: {
45064507
/** Position */

0 commit comments

Comments
 (0)