|
| 1 | +# stream comment |
| 2 | +--- |
| 3 | +openapi: 3.1.0 |
| 4 | +x-top-level: value |
| 5 | +info: |
| 6 | + title: Sample API |
| 7 | + unknownFixedField: value |
| 8 | + description: Optional multiline or single-line description in [CommonMark](http://commonmark.org/help/) |
| 9 | + or HTML. |
| 10 | + summary: example summary |
| 11 | + termsOfService: Terms of service |
| 12 | + version: 0.1.9 |
| 13 | + x-version: 0.1.9-beta |
| 14 | + license: |
| 15 | + name: Apache License 2.0 |
| 16 | + x-fullName: Apache License 2.0 |
| 17 | + identifier: Apache License 2.0 |
| 18 | + url: https://www.apache.org/licenses/LICENSE-2.0 |
| 19 | + contact: |
| 20 | + name: Vladimir Gorej |
| 21 | + x-username: char0n |
| 22 | + url: https://www.linkedin.com/in/vladimirgorej/ |
| 23 | + |
| 24 | +servers: |
| 25 | + - url: http://api.example.com/v1 |
| 26 | + description: Optional server description, e.g. Main (production) server |
| 27 | + - url: http:{port}//staging-api.example.com |
| 28 | + description: Optional server description, e.g. Internal staging server for testing |
| 29 | + variables: |
| 30 | + port: |
| 31 | + enum: |
| 32 | + - 8443 |
| 33 | + - 443 |
| 34 | + default: 8443 |
| 35 | + description: Port description |
| 36 | +components: |
| 37 | + x-extension: value |
| 38 | + schemas: |
| 39 | + x-model: |
| 40 | + type: object |
| 41 | + properties: |
| 42 | + id: |
| 43 | + type: integer |
| 44 | + User: |
| 45 | + type: object |
| 46 | + properties: |
| 47 | + id: |
| 48 | + type: integer |
| 49 | + name: |
| 50 | + type: string |
| 51 | + profile: |
| 52 | + $ref: #/components/schemas/UserProfile |
| 53 | + UserProfile: |
| 54 | + type: object |
| 55 | + properties: |
| 56 | + email: |
| 57 | + type: string |
| 58 | + x-nullable: true |
| 59 | + parameters: |
| 60 | + userId: |
| 61 | + $ref: #/components/parameters/userIdRef |
| 62 | + userIdRef: |
| 63 | + name: userId, |
| 64 | + in: query, |
| 65 | + description: ID of the user, |
| 66 | + required: true |
| 67 | +security: |
| 68 | + - {} |
| 69 | + - petstore_auth: |
| 70 | + - write:pets |
| 71 | + - read:pets |
| 72 | +paths: |
| 73 | + /users: |
| 74 | + summary: path item summary |
| 75 | + description: path item description |
| 76 | + get: |
| 77 | + tags: |
| 78 | + - tag1 |
| 79 | + - tag2 |
| 80 | + summary: Returns a list of users. |
| 81 | + description: Optional extended description in CommonMark or HTML. |
| 82 | + externalDocs: |
| 83 | + description: Find more info here |
| 84 | + url: https://example.com |
| 85 | + operationId: getUserList |
| 86 | + parameters: |
| 87 | + - "$ref": #/components/parameters/userId |
| 88 | + requestBody: |
| 89 | + content: {} |
| 90 | + responses: |
| 91 | + 200: |
| 92 | + description: A JSON array of user names |
| 93 | + content: |
| 94 | + application/json: |
| 95 | + schema: |
| 96 | + type: array |
| 97 | + items: |
| 98 | + type: string |
| 99 | + 201: |
| 100 | + description: A response |
| 101 | + content: |
| 102 | + application/json: |
| 103 | + schema: |
| 104 | + $ref: #/components/schemas/User |
| 105 | + xxx: |
| 106 | + key: val |
| 107 | + callbacks: |
| 108 | + myCallback: |
| 109 | + '{$request.query.queryUrl}': |
| 110 | + post: |
| 111 | + requestBody: |
| 112 | + description: Callback payload |
| 113 | + content: |
| 114 | + application/json: |
| 115 | + schema: |
| 116 | + $ref: #/components/schemas/User |
| 117 | + responses: |
| 118 | + 200: |
| 119 | + description: callback successfully processed |
| 120 | + deprecated: true |
| 121 | + security: |
| 122 | + - {} |
| 123 | + - petstore_auth: |
| 124 | + - write:pets |
| 125 | + - read:pets |
| 126 | + servers: |
| 127 | + - url: http://api.example.com/v3 |
| 128 | + description: Redundant server description, e.g. redundant server |
| 129 | + servers: |
| 130 | + - url: http://api.example.com/v2 |
| 131 | + description: Redundant server description, e.g. redundant server |
| 132 | + parameters: |
| 133 | + - name: userId |
| 134 | + in: query |
| 135 | + description: ID of the user |
| 136 | + required: true |
| 137 | +... |
| 138 | +prop: value |
0 commit comments