Skip to content

Commit 88ed567

Browse files
Copilotmrlubos
andcommitted
Update test snapshots with server configuration
Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com>
1 parent 138d9cc commit 88ed567

4 files changed

Lines changed: 60 additions & 14 deletions

File tree

packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/transformers-allof-response-wrapper/types.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// This file is auto-generated by @hey-api/openapi-ts
22

33
export type ClientOptions = {
4-
baseUrl: `${string}://specs` | (string & {});
4+
baseUrl: '{protocol}://specs' | (string & {});
55
};
66

77
export type PaginatedResponse = {

packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transformers-allof-response-wrapper/types.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// This file is auto-generated by @hey-api/openapi-ts
22

33
export type ClientOptions = {
4-
baseUrl: `${string}://specs` | (string & {});
4+
baseUrl: '{protocol}://specs' | (string & {});
55
};
66

77
export type PaginatedResponse = {

specs/3.0.x/transformers-allof-response-wrapper.json

Lines changed: 47 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,39 @@
1212
"meta": {
1313
"type": "object",
1414
"properties": {
15-
"page": { "type": "number" },
16-
"limit": { "type": "number" },
17-
"total": { "type": "number" },
18-
"totalPages": { "type": "number" }
15+
"page": {
16+
"type": "number"
17+
},
18+
"limit": {
19+
"type": "number"
20+
},
21+
"total": {
22+
"type": "number"
23+
},
24+
"totalPages": {
25+
"type": "number"
26+
}
1927
}
2028
}
2129
}
2230
},
2331
"RepositorySecret": {
2432
"type": "object",
2533
"properties": {
26-
"id": { "type": "number" },
27-
"name": { "type": "string" },
28-
"createdAt": { "format": "date-time", "type": "string" },
29-
"updatedAt": { "format": "date-time", "type": "string" }
34+
"id": {
35+
"type": "number"
36+
},
37+
"name": {
38+
"type": "string"
39+
},
40+
"createdAt": {
41+
"format": "date-time",
42+
"type": "string"
43+
},
44+
"updatedAt": {
45+
"format": "date-time",
46+
"type": "string"
47+
}
3048
},
3149
"required": ["id", "name", "createdAt", "updatedAt"]
3250
}
@@ -44,12 +62,16 @@
4462
"schema": {
4563
"title": "PaginatedResponseRepositorySecret",
4664
"allOf": [
47-
{ "$ref": "#/components/schemas/PaginatedResponse" },
65+
{
66+
"$ref": "#/components/schemas/PaginatedResponse"
67+
},
4868
{
4969
"properties": {
5070
"data": {
5171
"type": "array",
52-
"items": { "$ref": "#/components/schemas/RepositorySecret" }
72+
"items": {
73+
"$ref": "#/components/schemas/RepositorySecret"
74+
}
5375
}
5476
}
5577
}
@@ -69,12 +91,25 @@
6991
"description": "Created",
7092
"content": {
7193
"application/json": {
72-
"schema": { "$ref": "#/components/schemas/RepositorySecret" }
94+
"schema": {
95+
"$ref": "#/components/schemas/RepositorySecret"
96+
}
7397
}
7498
}
7599
}
76100
}
77101
}
78102
}
79-
}
103+
},
104+
"servers": [
105+
{
106+
"url": "{protocol}://specs",
107+
"variables": {
108+
"protocol": {
109+
"default": "https",
110+
"enum": ["http", "https"]
111+
}
112+
}
113+
}
114+
]
80115
}

specs/3.1.x/transformers-allof-response-wrapper.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@
44
"title": "Test Paginated Response",
55
"version": "1.0.0"
66
},
7+
"servers": [
8+
{
9+
"url": "{protocol}://specs",
10+
"variables": {
11+
"protocol": {
12+
"default": "https",
13+
"enum": ["http", "https"]
14+
}
15+
}
16+
}
17+
],
718
"components": {
819
"schemas": {
920
"PaginatedResponse": {

0 commit comments

Comments
 (0)