Skip to content

Commit 79399ac

Browse files
Alan-ChaErikWittern
authored andcommitted
Fix fixtures
Signed-off-by: Alan Cha <[email protected]>
1 parent eb47cc5 commit 79399ac

File tree

6 files changed

+73
-135
lines changed

6 files changed

+73
-135
lines changed

packages/openapi-to-graphql/test/cloudfunction_oas.test.ts

Lines changed: 0 additions & 35 deletions
This file was deleted.

packages/openapi-to-graphql/test/fixtures/example_oas.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
"termsOfService": "http://example.com/terms/",
88
"contact": {
99
"name": "Erik Wittern",
10-
"url": "http://www.example.com/support",
11-
"email": "[email protected]"
10+
"url": "http://www.example.com/support"
1211
},
1312
"license": {
1413
"name": "Apache 2.0",

packages/openapi-to-graphql/test/fixtures/example_oas2.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
"termsOfService": "http://example.com/terms/",
88
"contact": {
99
"name": "Erik Wittern",
10-
"url": "http://www.example.com/support",
11-
"email": "[email protected]"
10+
"url": "http://www.example.com/support"
1211
},
1312
"license": {
1413
"name": "Apache 2.0",

packages/openapi-to-graphql/test/fixtures/example_oas3.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
"termsOfService": "http://example.com/terms/",
88
"contact": {
99
"name": "Erik Wittern",
10-
"url": "http://www.example.com/support",
11-
"email": "[email protected]"
10+
"url": "http://www.example.com/support"
1211
},
1312
"license": {
1413
"name": "Apache 2.0",

packages/openapi-to-graphql/test/fixtures/example_oas4.json

Lines changed: 70 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
"termsOfService": "http://example.com/terms/",
88
"contact": {
99
"name": "Erik Wittern",
10-
"url": "http://www.example.com/support",
11-
"email": "[email protected]"
10+
"url": "http://www.example.com/support"
1211
},
1312
"license": {
1413
"name": "Apache 2.0",
@@ -31,7 +30,7 @@
3130
"description": "The location of the local test server.",
3231
"variables": {
3332
"port": {
34-
"default": "3001"
33+
"default": "3004"
3534
},
3635
"basePath": {
3736
"default": "api"
@@ -42,10 +41,10 @@
4241
"paths": {
4342
"/oneOf": {
4443
"get": {
45-
"description": "It could be anything!",
44+
"description": "Basic oneOf test",
4645
"responses": {
4746
"200": {
48-
"description": "Mystery object",
47+
"description": "Mandatory field",
4948
"content": {
5049
"application/json": {
5150
"schema": {
@@ -66,10 +65,10 @@
6665
},
6766
"/anyOf": {
6867
"get": {
69-
"description": "It could be anything!",
68+
"description": "Basic anyOf test using the same subschemas",
7069
"responses": {
7170
"200": {
72-
"description": "Mystery object",
71+
"description": "Mandatory field",
7372
"content": {
7473
"application/json": {
7574
"schema": {
@@ -90,10 +89,10 @@
9089
},
9190
"/anyOf2": {
9291
"get": {
93-
"description": "It could be anything!",
92+
"description": "Basic anyOf test with different subschemas",
9493
"responses": {
9594
"200": {
96-
"description": "Mystery object",
95+
"description": "Mandatory field",
9796
"content": {
9897
"application/json": {
9998
"schema": {
@@ -114,10 +113,10 @@
114113
},
115114
"/anyOf3": {
116115
"get": {
117-
"description": "It could be anything!",
116+
"description": "AnyOf test with the same nested subschemas",
118117
"responses": {
119118
"200": {
120-
"description": "Mystery object",
119+
"description": "Mandatory field",
121120
"content": {
122121
"application/json": {
123122
"schema": {
@@ -146,10 +145,10 @@
146145
},
147146
"/anyOf4": {
148147
"get": {
149-
"description": "It could be anything!",
148+
"description": "AnyOf test with different nested subschemas",
150149
"responses": {
151150
"200": {
152-
"description": "Mystery object",
151+
"description": "Mandatory field",
153152
"content": {
154153
"application/json": {
155154
"schema": {
@@ -178,27 +177,73 @@
178177
},
179178
"/anyOf5": {
180179
"get": {
181-
"description": "It could be anything!",
180+
"description": "AnyOf test with incompatible subschema types",
182181
"responses": {
183182
"200": {
184-
"description": "Mystery object",
183+
"description": "Mandatory field",
185184
"content": {
186185
"application/json": {
187186
"schema": {
188187
"anyOf": [
189188
{
190-
"properties": {
191-
"commonAttribute": {
192-
"$ref": "#/components/schemas/commonAttributeObject"
193-
}
194-
}
189+
"$ref": "#/components/schemas/commonAttributeObject"
195190
},
196191
{
197-
"properties": {
198-
"differentAttribute": {
199-
"$ref": "#/components/schemas/differentAttributeObject"
200-
}
201-
}
192+
"type": "string"
193+
}
194+
]
195+
}
196+
}
197+
}
198+
}
199+
}
200+
}
201+
},
202+
"/anyOf6": {
203+
"get": {
204+
"description": "AnyOf test with some extraneous subschemas",
205+
"responses": {
206+
"200": {
207+
"description": "Mandatory field",
208+
"content": {
209+
"application/json": {
210+
"schema": {
211+
"anyOf": [
212+
{
213+
"$ref": "#/components/schemas/commonAttributeObject"
214+
},
215+
{
216+
"minimum": -90
217+
},
218+
{
219+
"maximum": 90
220+
}
221+
]
222+
}
223+
}
224+
}
225+
}
226+
}
227+
}
228+
},
229+
"/anyOf7": {
230+
"get": {
231+
"description": "AnyOf test with some extraneous subschemas",
232+
"responses": {
233+
"200": {
234+
"description": "Mandatory field",
235+
"content": {
236+
"application/json": {
237+
"schema": {
238+
"anyOf": [
239+
{
240+
"type": "integer"
241+
},
242+
{
243+
"minimum": -90
244+
},
245+
{
246+
"maximum": 90
202247
}
203248
]
204249
}

packages/openapi-to-graphql/test/government_social_work_api.test.ts

Lines changed: 0 additions & 69 deletions
This file was deleted.

0 commit comments

Comments
 (0)