File: gentest2.yaml

package info (click to toggle)
golang-github-go-openapi-validate 0.24.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,040 kB
  • sloc: sh: 11; makefile: 6
file content (724 lines) | stat: -rw-r--r-- 15,952 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
swagger: '2.0'
info:
  title: code generation test fixture for parameters, with default values
  version: '1.0.0'
host: localhost
basePath: /
consumes:
  - application/json
produces:
  - application/json
schemes:
  - http
paths:
  /required/params:
    get:
      operationId: getRequired
      parameters:
      - name: notAnOption1
        in: query
        type: string
        format: date
        required: true
      - name: notAnOption2
        in: query
        type: string
        format: password
        pattern: '^[a-z]$'
        required: true
      - name: notAnOption3
        in: query
        type: integer
        format: int32
        required: true
      - name: notAnOption4
        in: query
        type: integer
        format: int32
        required: true
        minimum: 10
        maximum: 100
        multipleOf: 10
      - name: notAnOption5
        in: query
        type: array
        required: true
        maxItems: 2
        items:
          type: string
          format: uuid
      - name: notAnOption6
        in: query
        type: array
        collectionFormat: pipes
        required: true
        uniqueItems: true
        items:
          type: integer
          format: int32
          minimum: 10
          maximum: 100
          multipleOf: 10
      - name: notAnOption7
        in: query
        type: array
        collectionFormat: pipes
        required: true
        uniqueItems: false
        items:
          type: array
          collectionFormat: csv
          uniqueItems: true
          items:
            type: string
            format: date
      responses: &stdResponses
        200:
          description: simple type
          schema:
            type: string
            format: date
        201:
          description: simple type
          schema:
            type: string
            format: uuid
        default:
          description: schema type
          schema:
            $ref: '#/definitions/ContainerConfig'
  /optional/params:
    get:
      operationId: getOptional
      parameters:
      - name: sanityCheck1
        in: query
        type: string
        required: false
        default: sanity check one passed for primitive type
      - name: sanityCheck2
        in: query
        type: number
        required: false
        default: 99.9
      - name: sanityCheck3
        in: query
        type: integer
        required: false
        default: 1000
      - name: sanityCheck4
        in: query
        type: integer
        format: uint32
        required: false
        default: 100
      - name: sanityCheckFormat1
        in: query
        type: string
        format: uuid
        required: false
        default: a8098c1a-f86e-11da-bd1a-00112444be1e
      - name: isAnOption1
        in: query
        type: string
        format: date
        required: false
        default: '1970-01-01'
      - name: isAnOption2
        in: query
        type: string
        format: password
        pattern: '^[a-z]$'
        required: false
        default: z
      - name: isAnOption3
        in: query
        type: integer
        format: int32
        required: false
        default: 32
      - name: isAnOption4
        in: query
        type: integer
        format: int32
        required: false
        minimum: 10
        maximum: 100
        multipleOf: 10
        default: 60
      - name: isAnOption5
        in: query
        type: array
        maxItems: 2
        items:
          type: string
          format: uuid
        default:
        - a8098c1a-f86e-11da-bd1a-00112444be1e
      - name: isAnOption6
        in: query
        type: array
        collectionFormat: pipes
        required: false
        items:
          type: integer
          format: int32
          minimum: 10
          maximum: 100
          multipleOf: 10
        default:
        - 10
        - 20
        - 30
        - 40
      - name: isAnOption7
        in: query
        type: array
        collectionFormat: pipes
        required: false
        items:
          type: array
          collectionFormat: csv
          items:
            type: string
            format: date
          default:
          - '2018-01-01'
          - '2018-01-02'
          - '2018-01-03'
          - '2018-01-04'
        default:
        -
          - '2012-01-01'
          - '2014-01-02'
          - '2016-01-03'
          - '2018-01-04'
        -
          - '2011-01-01'
          - '2013-01-02'
          - '2015-01-03'
          - '2017-01-04'
      - name: isAnOption8
        in: query
        type: array
        maxItems: 2
        uniqueItems: true
        items:
          type: string
        default:
        - default unformatted string array item 1
        - default unformatted string array item 2
      - name: isAnOption9
        in: query
        type: array
        collectionFormat: pipes
        required: false
        items:
          type: array
          collectionFormat: csv
          items:
            type: string
            format: duration
          default:
          - 1d
          - 1w
          - 1h
          - 2w
        default:
        -
          - 1s
          - 1h
          - 1d
          - 1w
        -
          - 2s
          - 2h
          - 2d
          - 2w
      responses: *stdResponses
  /path/params/{notAnOption1}/{notAnOption2}/{notAnOption3}/{notAnOption4}/{notAnOption5}/{notAnOption6}/{notAnOption7}:
    get:
      operationId: getRequiredInPath
      parameters:
      - name: notAnOption1
        in: path
        type: string
        format: date
        required: true
      - name: notAnOption2
        in: path
        type: string
        format: password
        pattern: '^[a-z]$'
        required: true
      - name: notAnOption3
        in: path
        type: integer
        format: int32
        required: true
      - name: notAnOption4
        in: path
        type: integer
        format: int32
        required: true
        minimum: 10
        maximum: 100
        multipleOf: 10
      - name: notAnOption5
        in: path
        type: array
        maxItems: 2
        required: true
        items:
          type: string
          format: uuid
      - name: notAnOption6
        in: path
        type: array
        collectionFormat: pipes
        required: true
        items:
          type: integer
          format: int32
          minimum: 10
          maximum: 100
          multipleOf: 10
      - name: notAnOption7
        in: path
        type: array
        collectionFormat: pipes
        required: true
        items:
          type: array
          collectionFormat: csv
          items:
            type: string
            format: date
      responses: *stdResponses
  /optional/headers:
    get:
      operationId: getInHeaders
      parameters:
      - name: isAnOption1
        in: header
        type: string
        format: date
        required: false
        default: '1970-01-01'
      - name: isAnOption2
        in: header
        type: string
        format: password
        pattern: '^[a-z]$'
        required: false
        default: z
      - name: isAnOption3
        in: header
        type: integer
        format: int32
        required: false
        default: 32
      - name: isAnOption4
        in: header
        type: integer
        format: int32
        required: false
        minimum: 10
        maximum: 100
        multipleOf: 10
        default: 60
      - name: isAnOption5
        in: header
        type: array
        maxItems: 2
        items:
          type: string
          format: uuid
        default:
        - a8098c1a-f86e-11da-bd1a-00112444be1e
      - name: isAnOption6
        in: header
        type: array
        collectionFormat: pipes
        required: false
        items:
          type: integer
          format: int32
          minimum: 10
          maximum: 100
          multipleOf: 10
        default:
        - 10
        - 20
        - 30
        - 40
      - name: isAnOption7
        in: header
        type: array
        collectionFormat: pipes
        required: false
        items:
          type: array
          collectionFormat: csv
          items:
            type: string
            format: date
          default:
          - '2018-01-01'
          - '2018-01-02'
          - '2018-01-03'
          - '2018-01-04'
        default:
        -
          - '2012-01-01'
          - '2014-01-02'
          - '2016-01-03'
          - '2018-01-04'
        -
          - '2011-01-01'
          - '2013-01-02'
          - '2015-01-03'
          - '2017-01-04'
      responses: *stdResponses
  /mixed/deepnested:
    get:
      operationId: getInDepth
      parameters:
      - name: deepNested1
        in: query
        type: array
        collectionFormat: pipes
        required: true
        maxItems: 2
        items:
          type: array
          collectionFormat: csv
          minItems: 2
          items:
            type: array
            collectionFormat: ssv
            uniqueItems: true
            items:
              type: string
              pattern: '^[a-z]$'
            default:
            - a
            - b
            - c
          default:
          -
            - x
            - 'y'
            - z
          -
            - u
            - v
            - w
        default:
        -
          -
            - h
            - i
            - j
          -
            - k
            - l
            - m
        -
          -
            - h
            - i
            - j
          -
            - k
            - l
            - m
      - name: deepNested2
        in: header
        type: array
        collectionFormat: pipes
        required: false
        maxItems: 2
        items:
          type: array
          collectionFormat: csv
          minItems: 2
          items:
            type: array
            collectionFormat: ssv
            uniqueItems: true
            items:
              type: string
              pattern: '^[a-z]$'
            default:
            - a
            - b
            - c
          default:
          -
            - x
            - 'y'
            - z
          -
            - u
            - v
            - w
        default:
        -
          -
            - h
            - i
            - j
          -
            - k
            - l
            - m
        -
          -
            - h
            - i
            - j
          -
            - k
            - l
            - m
      responses: *stdResponses
  /mixed/mixedBody/{pathParam1}:
    post:
      operationId: getInBody
      parameters:
      - name: bodyBuilding
        in: body
        schema:
          $ref: '#/definitions/ContainerConfig'
      - name: queryParam1
        in: query
        type: integer
        required: false
        allowEmptyValue: true
        default: 100
        maximum: 1000
      - name: queryParam2
        in: query
        type: string
        format: date
        required: false
        default: '1970-01-01'
      - name: queryParam3
        in: query
        type: integer 
        format: uint32
        minimum: 12
        exclusiveMinimum: true
        allowEmptyValue: true
        required: true
      - name: queryParam4
        in: query
        collectionFormat: multi
        maxItems: 2
        type: array
        items:
          type: string
          format: uuid
        default:
        - a8098c1a-f86e-11da-bd1a-00112444be1e
        - a8098c1a-f86e-11da-bd1a-00112444be1e
      - name: query_issue_863
        in: query
        type: array
        items:
          type: string
          enum:
          - enum1
          - enum2
          - enum3
      - name: pathParam1
        in: path
        type: string
        pattern: '^\w+$'
        required: true
      - name: headerParam1
        in: header
        type: array
        items:
          type: number
        default:
        - 1.1
        - 2.75
        required: false
      responses: *stdResponses

  /mixed/mixedBody2/{pathParam1}:
    post:
      operationId: getInBody2
      parameters:
      - name: bodyBuilding
        in: body
        required: true
        schema:
          $ref: '#/definitions/errorResponseMsg'
      - name: queryParam1
        in: query
        type: integer
        required: false
        allowEmptyValue: true
        default: 100
        maximum: 1000
      - name: queryParam2
        in: query
        type: string
        format: date
        required: true
        default: '1970-01-01'
      - name: queryParam3
        in: query
        type: integer 
        format: uint32
        minimum: 12
        exclusiveMinimum: true
        allowEmptyValue: true
        required: true
      - name: queryParam4
        in: query
        collectionFormat: multi
        maxItems: 2
        type: array
        items:
          type: string
          format: uuid
        default:
        - a8098c1a-f86e-11da-bd1a-00112444be1e
      - name: pathParam1
        in: path
        type: string
        pattern: '^\w+$'
        required: true
      - name: headerParam1
        in: header
        type: array
        items:
          type: number
        default:
        - 1.1
        - 2.75
        required: false
      responses: *stdResponses

  /mixed/mixedBody3/{pathParam1}:
    post:
      operationId: getInBody3
      parameters:
      - name: bodyBuilding
        in: body
        required: false
        schema:
          $ref: '#/definitions/errorResponseMsg'
      - name: queryParam1
        in: query
        type: integer
        required: false
        allowEmptyValue: true
        default: 100
        maximum: 1000
      - name: queryParam2
        in: query
        type: string
        format: date
        required: true
        default: '1970-01-01'
      - name: queryParam3
        in: query
        type: integer 
        format: uint32
        minimum: 12
        exclusiveMinimum: true
        allowEmptyValue: true
        required: true
      - name: queryParam4
        in: query
        collectionFormat: multi
        maxItems: 2
        type: array
        items:
          type: string
          format: uuid
        default:
        - a8098c1a-f86e-11da-bd1a-00112444be1e
      - name: pathParam1
        in: path
        type: string
        pattern: '^\w+$'
        required: true
      - name: headerParam1
        in: header
        type: array
        items:
          type: number
        default:
        - 1.1
        - 2.75
        required: false
      responses: *stdResponses
  /form/{pathParam1}:
    post:
      operationId: getInForm
      consumes:
      - multipart/formData
      parameters:
      - name: pathParam1
        in: path
        type: string
        maxLength: 10
        required: true
      - name: docname
        in: formData
        type: string
        pattern: '^\w+\.doc$'
        required: true
      - name: docAuthor
        in: formData
        type: string
      - name: attachment
        in: formData
        type: file
        required: true
      - name: addendum
        in: formData
        type: file
        required: false
      responses: *stdResponses

definitions:
  ContainerConfig:
    type: object
    required: [config1]
    properties:
      config1:
        type: string
        format: date
      config2:
        type: string
        format: date
        default: '1999-09-09'
    default:
      config1: '2019-09-09'
      config2: '2018-09-09'
  errorResponseMsg:
    type: object 
    required: [ errorCode, reason ]
    properties:
      errorCode:
        type: integer
      reason:
        type: string
      severity:
        type: string
        enum: [ FATAL, CRITICAL, ERROR, WARNING, INFO ]
      additional:
        type: string
        enum: [ FATAL, CRITICAL, ERROR, WARNING, INFO ]
        default: INFO
    default:
      errorCode: 501
      reason: not implemented
      severity: FATAL