| 1 | --- |
| 2 | swagger: '2.0' |
| 3 | info: |
| 4 | version: '0.1.0' |
| 5 | title: JSON pointers |
| 6 | |
| 7 | parameters: |
| 8 | someParam: |
| 9 | name: some |
| 10 | in: query |
| 11 | type: string |
| 12 | bodyParam: |
| 13 | name: some |
| 14 | in: body |
| 15 | schema: |
| 16 | $ref: '#/responses/notFound/schema' |
| 17 | remoteParam: |
| 18 | name: some |
| 19 | in: body |
| 20 | schema: |
| 21 | $ref: 'remote.yaml#/remotes/u64' |
| 22 | |
| 23 | responses: |
| 24 | notFound: |
| 25 | description: 'Not Found' |
| 26 | schema: |
| 27 | $ref: '#/definitions/notFound' |
| 28 | funnyResponse: |
| 29 | description: ok |
| 30 | schema: |
| 31 | $ref: '#/parameters/bodyParam/schema' |
| 32 | remoteResponse: |
| 33 | description: ok |
| 34 | schema: |
| 35 | type: object |
| 36 | properties: |
| 37 | prop0: |
| 38 | $ref: 'remote.yaml#/remotes/u64' |
| 39 | |
| 40 | paths: |
| 41 | /some/where: |
| 42 | parameters: |
| 43 | - $ref: '#/parameters/someParam' |
| 44 | get: |
| 45 | parameters: |
| 46 | - $ref: '#/parameters/bodyParam' |
| 47 | - name: other |
| 48 | in: query |
| 49 | type: string |
| 50 | responses: |
| 51 | default: |
| 52 | $ref: '#/responses/notFound' |
| 53 | 404: |
| 54 | description: ok |
| 55 | schema: |
| 56 | $ref: '#/definitions/myResponse' |
| 57 | 200: |
| 58 | description: 'RecordHolder' |
| 59 | schema: |
| 60 | type: object |
| 61 | properties: |
| 62 | prop0: |
| 63 | $ref: '#/definitions/myBody' |
| 64 | post: |
| 65 | responses: |
| 66 | default: |
| 67 | description: default |
| 68 | schema: |
| 69 | $ref: '#/definitions/myDefaultResponse/properties/zzz' |
| 70 | 203: |
| 71 | description: funny |
| 72 | schema: |
| 73 | $ref: '#/responses/funnyResponse/schema' |
| 74 | 204: |
| 75 | $ref: '#/responses/funnyResponse' |
| 76 | /some/where/else: |
| 77 | get: |
| 78 | responses: |
| 79 | default: |
| 80 | description: default |
| 81 | schema: |
| 82 | $ref: '#/definitions/notFound' |
| 83 | 200: |
| 84 | description: ok |
| 85 | schema: |
| 86 | $ref: '#/definitions/myDefaultResponse' |
| 87 | /with/slice/container: |
| 88 | get: |
| 89 | responses: |
| 90 | default: |
| 91 | description: default |
| 92 | schema: |
| 93 | allOf: |
| 94 | - $ref: 'remote.yaml#/remotes/u64' |
| 95 | - $ref: 'remote.yaml#/remotes/u32' |
| 96 | - $ref: '#/definitions/myBody/properties/prop3' |
| 97 | /with/tuple/container: |
| 98 | get: |
| 99 | responses: |
| 100 | default: |
| 101 | description: default |
| 102 | schema: |
| 103 | type: array |
| 104 | items: |
| 105 | - $ref: '#/definitions/myBody/properties/prop2' |
| 106 | - $ref: '#/definitions/myBody/properties/prop3' |
| 107 | - $ref: 'remote.yaml#/remotes/i32' |
| 108 | /with/array/container: |
| 109 | get: |
| 110 | responses: |
| 111 | 200: |
| 112 | description: ok |
| 113 | schema: |
| 114 | $ref: '#/definitions/anArray' |
| 115 | default: |
| 116 | description: default |
| 117 | schema: |
| 118 | type: array |
| 119 | items: |
| 120 | $ref: '#/definitions/anArray/items' |
| 121 | /with/boolable/container: |
| 122 | get: |
| 123 | responses: |
| 124 | 200: |
| 125 | description: ok |
| 126 | schema: |
| 127 | type: array |
| 128 | items: |
| 129 | - type: integer |
| 130 | - type: string |
| 131 | additionalItems: |
| 132 | $ref: '#/definitions/myBody/properties/prop3' |
| 133 | default: |
| 134 | description: default |
| 135 | schema: |
| 136 | type: object |
| 137 | additionalProperties: |
| 138 | $ref: '#/definitions/myBody/properties/prop3' |
| 139 | /with/ZcomesFirstInOrder/container: |
| 140 | get: |
| 141 | responses: |
| 142 | 200: |
| 143 | description: ok |
| 144 | schema: |
| 145 | type: array |
| 146 | items: |
| 147 | - type: integer |
| 148 | - type: string |
| 149 | additionalItems: |
| 150 | $ref: '#/definitions/myBody/properties/prop3' |
| 151 | 203: |
| 152 | description: ok |
| 153 | schema: |
| 154 | $ref: '#/definitions/anExtensible/additionalProperties' |
| 155 | 204: |
| 156 | description: ok |
| 157 | schema: |
| 158 | type: object |
| 159 | additionalProperties: |
| 160 | type: object |
| 161 | additionalProperties: |
| 162 | $ref: '#/definitions/anExtensible/additionalProperties' |
| 163 | definitions: |
| 164 | anExtensible: |
| 165 | type: object |
| 166 | additionalProperties: |
| 167 | type: object |
| 168 | properties: |
| 169 | addProp1: |
| 170 | type: string |
| 171 | anArray: |
| 172 | type: array |
| 173 | items: |
| 174 | type: string |
| 175 | format: uuid |
| 176 | notFound: |
| 177 | type: object |
| 178 | properties: |
| 179 | prop1: |
| 180 | $ref: '#/definitions/myDefaultResponse/properties/zzz' |
| 181 | myDefaultResponse: |
| 182 | type: object |
| 183 | properties: |
| 184 | zzz: |
| 185 | type: integer |
| 186 | myResponse: |
| 187 | type: object |
| 188 | additionalProperties: |
| 189 | $ref: '#/definitions/notFound/properties/prop1' |
| 190 | myBody: |
| 191 | type: object |
| 192 | properties: |
| 193 | prop2: |
| 194 | type: integer |
| 195 | prop3: |
| 196 | $ref: '#/definitions/myDefaultResponse/properties/zzz' |