@@ -81,13 +81,13 @@ final class Test_validateDoc: Test_Core {
8181 . init(
8282 get: . init(
8383 requestBody: . b(
84- . init( content: [ . init( rawValue: " application/xml " ) !: . init( schema: . string) ] )
84+ . init( content: [ . init( rawValue: " application/xml " ) !: . content ( . init( schema: . string) ) ] )
8585 ) ,
8686 responses: [
8787 . init( integerLiteral: 200 ) : . b(
8888 . init(
8989 description: " Test description 1 " ,
90- content: [ . init( rawValue: " application/json " ) !: . init( schema: . string) ]
90+ content: [ . init( rawValue: " application/json " ) !: . content ( . init( schema: . string) ) ]
9191 )
9292 )
9393 ]
@@ -97,12 +97,12 @@ final class Test_validateDoc: Test_Core {
9797 " /path2 " : . b(
9898 . init(
9999 get: . init(
100- requestBody: . b( . init( content: [ . init( rawValue: " text/html " ) !: . init( schema: . string) ] ) ) ,
100+ requestBody: . b( . init( content: [ . init( rawValue: " text/html " ) !: . content ( . init( schema: . string) ) ] ) ) ,
101101 responses: [
102102 . init( integerLiteral: 200 ) : . b(
103103 . init(
104104 description: " Test description 2 " ,
105- content: [ . init( rawValue: " text/plain " ) !: . init( schema: . string) ]
105+ content: [ . init( rawValue: " text/plain " ) !: . content ( . init( schema: . string) ) ]
106106 )
107107 )
108108 ]
@@ -127,12 +127,12 @@ final class Test_validateDoc: Test_Core {
127127 " /path1 " : . b(
128128 . init(
129129 get: . init(
130- requestBody: . b( . init( content: [ . init( rawValue: " application/ " ) !: . init( schema: . string) ] ) ) ,
130+ requestBody: . b( . init( content: [ . init( rawValue: " application/ " ) !: . content ( . init( schema: . string) ) ] ) ) ,
131131 responses: [
132132 . init( integerLiteral: 200 ) : . b(
133133 . init(
134134 description: " Test description 1 " ,
135- content: [ . init( rawValue: " application/json " ) !: . init( schema: . string) ]
135+ content: [ . init( rawValue: " application/json " ) !: . content ( . init( schema: . string) ) ]
136136 )
137137 )
138138 ]
@@ -142,12 +142,12 @@ final class Test_validateDoc: Test_Core {
142142 " /path2 " : . b(
143143 . init(
144144 get: . init(
145- requestBody: . b( . init( content: [ . init( rawValue: " text/html " ) !: . init( schema: . string) ] ) ) ,
145+ requestBody: . b( . init( content: [ . init( rawValue: " text/html " ) !: . content ( . init( schema: . string) ) ] ) ) ,
146146 responses: [
147147 . init( integerLiteral: 200 ) : . b(
148148 . init(
149149 description: " Test description 2 " ,
150- content: [ . init( rawValue: " text/plain " ) !: . init( schema: . string) ]
150+ content: [ . init( rawValue: " text/plain " ) !: . content ( . init( schema: . string) ) ]
151151 )
152152 )
153153 ]
@@ -179,13 +179,13 @@ final class Test_validateDoc: Test_Core {
179179 . init(
180180 get: . init(
181181 requestBody: . b(
182- . init( content: [ . init( rawValue: " application/xml " ) !: . init( schema: . string) ] )
182+ . init( content: [ . init( rawValue: " application/xml " ) !: . content ( . init( schema: . string) ) ] )
183183 ) ,
184184 responses: [
185185 . init( integerLiteral: 200 ) : . b(
186186 . init(
187187 description: " Test description 1 " ,
188- content: [ . init( rawValue: " application/json " ) !: . init( schema: . string) ]
188+ content: [ . init( rawValue: " application/json " ) !: . content ( . init( schema: . string) ) ]
189189 )
190190 )
191191 ]
@@ -195,12 +195,12 @@ final class Test_validateDoc: Test_Core {
195195 " /path2 " : . b(
196196 . init(
197197 get: . init(
198- requestBody: . b( . init( content: [ . init( rawValue: " text/html " ) !: . init( schema: . string) ] ) ) ,
198+ requestBody: . b( . init( content: [ . init( rawValue: " text/html " ) !: . content ( . init( schema: . string) ) ] ) ) ,
199199 responses: [
200200 . init( integerLiteral: 200 ) : . b(
201201 . init(
202202 description: " Test description 2 " ,
203- content: [ . init( rawValue: " /plain " ) !: . init( schema: . string) ]
203+ content: [ . init( rawValue: " /plain " ) !: . content ( . init( schema: . string) ) ]
204204 )
205205 )
206206 ]
@@ -232,23 +232,23 @@ final class Test_validateDoc: Test_Core {
232232 . init(
233233 get: . init(
234234 requestBody: . b(
235- . init( content: [ . init( rawValue: " application/xml " ) !: . init( schema: . string) ] )
235+ . init( content: [ . init( rawValue: " application/xml " ) !: . content ( . init( schema: . string) ) ] )
236236 ) ,
237237 responses: [
238238 . init( integerLiteral: 200 ) : . b(
239239 . init(
240240 description: " Test description 1 " ,
241- content: [ . init( rawValue: " application/json " ) !: . init( schema: . string) ]
241+ content: [ . init( rawValue: " application/json " ) !: . content ( . init( schema: . string) ) ]
242242 )
243243 )
244244 ]
245245 )
246246 )
247247 )
248248 ] ,
249- components: . init ( requestBodies: [
250- " exampleRequestBody1 " : . init( content: [ . init( rawValue: " application/pdf " ) !: . init( schema: . string) ] ) ,
251- " exampleRequestBody2 " : . init( content: [ . init( rawValue: " image/ " ) !: . init( schema: . string) ] ) ,
249+ components: . direct ( requestBodies: [
250+ " exampleRequestBody1 " : . init( content: [ . init( rawValue: " application/pdf " ) !: . content ( . init( schema: . string) ) ] ) ,
251+ " exampleRequestBody2 " : . init( content: [ . init( rawValue: " image/ " ) !: . content ( . init( schema: . string) ) ] ) ,
252252 ] )
253253 )
254254 XCTAssertThrowsError (
@@ -273,28 +273,28 @@ final class Test_validateDoc: Test_Core {
273273 . init(
274274 get: . init(
275275 requestBody: . b(
276- . init( content: [ . init( rawValue: " application/xml " ) !: . init( schema: . string) ] )
276+ . init( content: [ . init( rawValue: " application/xml " ) !: . content ( . init( schema: . string) ) ] )
277277 ) ,
278278 responses: [
279279 . init( integerLiteral: 200 ) : . b(
280280 . init(
281281 description: " Test description 1 " ,
282- content: [ . init( rawValue: " application/json " ) !: . init( schema: . string) ]
282+ content: [ . init( rawValue: " application/json " ) !: . content ( . init( schema: . string) ) ]
283283 )
284284 )
285285 ]
286286 )
287287 )
288288 )
289289 ] ,
290- components: . init ( responses: [
290+ components: . direct ( responses: [
291291 " exampleRequestBody1 " : . init(
292292 description: " Test description 1 " ,
293- content: [ . init( rawValue: " application/pdf " ) !: . init( schema: . string) ]
293+ content: [ . init( rawValue: " application/pdf " ) !: . content ( . init( schema: . string) ) ]
294294 ) ,
295295 " exampleRequestBody2 " : . init(
296296 description: " Test description 2 " ,
297- content: [ . init( rawValue: " " ) !: . init( schema: . string) ]
297+ content: [ . init( rawValue: " " ) !: . content ( . init( schema: . string) ) ]
298298 ) ,
299299 ] )
300300 )
@@ -321,13 +321,12 @@ final class Test_validateDoc: Test_Core {
321321 get: . init(
322322 parameters: . init(
323323 arrayLiteral: . b(
324- . init (
324+ . path (
325325 name: " ID " ,
326- context: . path,
327326 content: [
328- . init( rawValue: " text/plain " ) !: . init(
329- schema: . a ( . component( named: " Path1ParametersContentSchemaReference " ) )
330- )
327+ . init( rawValue: " text/plain " ) !: . content ( . init(
328+ schema: . reference ( . component( named: " Path1ParametersContentSchemaReference " ) )
329+ ) )
331330 ]
332331 )
333332 ) ,
@@ -340,9 +339,9 @@ final class Test_validateDoc: Test_Core {
340339 . init(
341340 description: " ResponseDescription " ,
342341 content: [
343- . init( rawValue: " text/plain " ) !: . init(
344- schema: . a ( . component( named: " ResponsesContentSchemaReference " ) )
345- )
342+ . init( rawValue: " text/plain " ) !: . content ( . init(
343+ schema: . reference ( . component( named: " ResponsesContentSchemaReference " ) )
344+ ) )
346345 ]
347346 )
348347 ) ,
@@ -360,9 +359,9 @@ final class Test_validateDoc: Test_Core {
360359 parameters: . init( arrayLiteral: . a( . component( named: " Path3ExampleID " ) ) ) ,
361360 requestBody: . b(
362361 . init( content: [
363- . init( rawValue: " text/html " ) !: . init(
364- schema: . a ( . component( named: " RequestBodyContentSchemaReference " ) )
365- )
362+ . init( rawValue: " text/html " ) !: . content ( . init(
363+ schema: . reference ( . component( named: " RequestBodyContentSchemaReference " ) )
364+ ) )
366365 ] )
367366 ) ,
368367 responses: [ : ] ,
@@ -371,16 +370,16 @@ final class Test_validateDoc: Test_Core {
371370 )
372371 ) ,
373372 ] ,
374- components: . init (
373+ components: . direct (
375374 schemas: [
376375 " ResponsesContentSchemaReference " : . init( schema: . string( . init( ) , . init( ) ) ) ,
377376 " RequestBodyContentSchemaReference " : . init( schema: . integer( . init( ) , . init( ) ) ) ,
378377 " Path1ParametersContentSchemaReference " : . init( schema: . string( . init( ) , . init( ) ) ) ,
379378 ] ,
380379 responses: [ " ResponsesReference " : . init( description: " Description " ) ] ,
381380 parameters: [
382- " Path3ExampleID " : . init ( name: " ID " , context : . path , content: . init( ) ) ,
383- " Path1ParametersReference " : . init ( name: " Schema " , context : . path , schema: . array) ,
381+ " Path3ExampleID " : . path ( name: " ID " , content: . init( ) ) ,
382+ " Path1ParametersReference " : . path ( name: " Schema " , schema: . array) ,
384383 ] ,
385384 requestBodies: [
386385 " RequestBodyReference " : . init( content: . init( ) )
@@ -404,9 +403,9 @@ final class Test_validateDoc: Test_Core {
404403 get: . init(
405404 requestBody: . b(
406405 . init( content: [
407- . init( rawValue: " text/html " ) !: . init(
408- schema: . a ( . component( named: " RequestBodyContentSchemaReference " ) )
409- )
406+ . init( rawValue: " text/html " ) !: . content ( . init(
407+ schema: . reference ( . component( named: " RequestBodyContentSchemaReference " ) )
408+ ) )
410409 ] )
411410 ) ,
412411 responses: [ : ]
0 commit comments