Server : LiteSpeed System : Linux in-mum-web1949.main-hosting.eu 5.14.0-503.40.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 5 06:06:04 EDT 2025 x86_64 User : u595547767 ( 595547767) PHP Version : 7.4.33 Disable Function : NONE Directory : /opt/go/pkg/mod/github.com/go-openapi/validate@v0.24.0/fixtures/validation/ |
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:
/headon:
get:
operationId: gimmeLottaHeaders
parameters:
- name: sampleParam
in: query
type: string
responses: &stdResponses
200:
description: sanity check name mangling for headers
headers: &myHeaders
sanity_check_header_1:
type: string
format: uuid
sanity-check-header-2:
type: string
format: date
sanityCheckHeader3:
type: integer
format: uint32
sanityCheckHeader3:
type: integer
format: uint32
X-sanityCheckHeader4:
type: string
format: password
pattern: '^\w+$'
# headers with collections
X-DeepHeader1:
type: array
# implicit: collectionFormat=csv
items:
type: integer
format: uint64
maximum: 50
X-DeepHeader2:
type: array
collectionFormat: pipes
items:
type: array
collectionFormat: csv
uniqueItems: true
items:
type: array
collectionFormat: tsv
maxItems: 10
items:
type: string
format: duration
schema:
type: string
format: date
201:
description: headers with default values
headers: &myDefaultHeaders
sanity_check_header_0:
type: string
default: simple string
sanity_check_header_float:
type: number
default: 9.99
sanity_check_header_1:
type: string
format: uuid
default: a8098c1a-f86e-11da-bd1a-00112444be1e
sanity-check-header-2:
type: string
format: date
default: x1972-01-01
sanityCheckHeader3:
type: integer
format: uint32
default: 100
sanityCheckHeader3:
type: number
format: float32
default: 1.45
X-sanityCheckHeader4:
type: string
format: password
pattern: '^\w+$'
default: abc
# headers with collections
X-DeepHeader1:
type: array
# implicit: collectionFormat=csv
items:
type: integer
format: uint64
maximum: 50
default:
- 1
- 2
- 3
X-DeepHeader2:
type: array
collectionFormat: pipes
items:
type: array
collectionFormat: csv
uniqueItems: true
items:
type: array
collectionFormat: tsv
maxItems: 10
items:
type: string
format: duration
default:
-
-
- 1s
- 2s
- 3s
-
- 1w
- 2w
- 3w
-
-
- 4s
- 5s
- 6s
-
- 4w
- 5w
- 6w
X-DeepHeader3:
type: array
collectionFormat: pipes
items:
type: array
collectionFormat: csv
uniqueItems: true
items:
type: array
collectionFormat: tsv
maxItems: 10
items:
type: string
format: date
default:
-
-
- 1999-01-01
- 1999-01-02
- 1999-01-03
-
- 1999-02-01
- 1999-02-02
- 1999-02-03
-
-
- 2000-01-01
- 2000-01-02
- 2000-01-03
-
- 2000-02-01
- 2000-02-02
- 2000-02-03
X-DeepHeader4:
type: array
collectionFormat: pipes
uniqueItems: true
items:
type: string
default:
- this
- is
- a song
schema:
type: string
format: date
default:
description: headers in default response
headers: *myHeaders
schema:
$ref: '#/definitions/errorResponseMsg'
definitions:
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