File: fixture-1231.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 (106 lines) | stat: -rw-r--r-- 2,594 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
swagger: '2.0'
info:
  title: test example
  version: "1.0.0"
produces:
  - application/json
paths:
  /v1/broker/{customer_id}:
    get:
      #operationId: a
      parameters:
        - $ref: "#/parameters/customerIdParam"
      responses:
        200:
          # in line example
          description: Customer
          schema:
            type: object
            properties:
              id:
                type: string
                format: uuid
              email:
                type: string
                format: email
              create_date:
                type: string
                format: date-time
          examples:
            application/json:
              id: mycustomer
              email: mycustomer@ripoffpark.com
              create_date: bad-date
  /v1/vendor/{customer_id}:
    get:
      #operationId: b
      parameters:
        - $ref: "#/parameters/customerIdParam"
      responses:
        200:
          description: Customer
          schema:
            $ref: '#/definitions/customer2'
  /v1/customer/{customer_id}:
    get:
      #operationId: c
      parameters:
        - $ref: "#/parameters/customerIdParam"
      responses:
        200:
          description: Customer
          schema:
            $ref: '#/definitions/customer'            
parameters:
  customerIdParam:
    name: customer_id
    description: The ID of the customer
    in: path
    required: true
    type: string
    format: uuid
    example: xyz            #<---- example not allowed here
definitions:
  # example property by property
  customer:
    type: object
    required:
    - id
    properties:
      id:
        type: string
        format: uuid
        description: The unique ID of the customer
        example: 123
      email:
        type: string
        format: email
        description: The email address of the customer
        example: 123
      create_date:
        type: string
        format: date-time
        description: The date and time when the customer was created
        example: 123
  # example at object level
  customer2:
    type: object
    required:
    - id
    properties:
      id:
        type: string
        format: uuid
        description: The unique ID of the customer
      email:
        type: string
        format: email
        description: The email address of the customer
      create_date:
        type: string
        format: date-time
        description: The date and time when the customer was created
    example:
      id: 'mycustomer'
      email: 'mycustomer@ripoffpark.com'
      create_date: bad-date