openapi: 3.0.0 x-an-extension-null: null x-an-extension-primitive: 1 x-an-extension-array: [] x-an-extension-object: {} info: version: 0.0.0 title: Thing API (@alasdairhurst on GitHub) description: https://github.com/apigee-127/sway/pull/220#issuecomment-587568565 contact: name: Axway Person url: http://www.axway.com email: foo@bar.com x-an-extension-null: null x-an-extension-primitive: 1 x-an-extension-array: [] x-an-extension-object: {} license: name: FREE url: http://www.axway.com x-an-extension-null: null x-an-extension-primitive: 1 x-an-extension-array: [] x-an-extension-object: {} x-an-extension-null: null x-an-extension-primitive: 1 x-an-extension-array: [] x-an-extension-object: {} paths: x-an-extension-null: null x-an-extension-primitive: 1 x-an-extension-array: [] x-an-extension-object: get: description: this is an x- extension and not a path/method responses: default: description: too lazy to make a 200 x-not-a-path-but-used-in-ref: get: description: this is a method used by a path which isn't 'x-not-a-path-but-used-in-ref' responses: default: description: too lazy to make a 200 /thingEmpty: {} /thingyref: $ref: "#/paths/x-not-a-path-but-used-in-ref" /thing: parameters: - $ref: "#/components/parameters/apiKey" get: x-an-extension-null: null x-an-extension-primitive: 1 x-an-extension-array: [] x-an-extension-object: {} description: has no operation id, no parameters responses: default: description: too lazy to make a 200 patch: x-an-extension-null: null x-an-extension-primitive: 1 x-an-extension-array: [] x-an-extension-object: {} description: updates name parameters: - name: name in: query schema: type: string - name: apiKey in: query description: Overrides the path item parameters schema: type: number responses: "204": description: done delete: x-an-extension-null: null x-an-extension-primitive: 1 x-an-extension-array: [] x-an-extension-object: {} tags: - foo - bar - baz summary: interesting endpoint which deletes something for the sake of it. externalDocs: description: foo url: http://www.axway.com x-an-extension-null: null x-an-extension-primitive: 1 x-an-extension-array: [] x-an-extension-object: {} operationId: deleteNameUnique description: deletes name parameters: - $ref: "#/components/parameters/name" - $ref: "#/components/parameters/fooArr" - $ref: "#/components/parameters/barInt" responses: "201": description: done put: x-an-extension-null: null x-an-extension-primitive: 1 x-an-extension-array: [] x-an-extension-object: {} operationId: uploadThing requestBody: content: multipart/form-data: schema: type: object properties: thing: description: file to upload type: string format: binary x-an-extension-null: null x-an-extension-primitive: 1 x-an-extension-array: [] x-an-extension-object: {} required: - thing responses: default: description: Updated post: x-an-extension-null: null x-an-extension-primitive: 1 x-an-extension-array: [] x-an-extension-object: {} operationId: upsert requestBody: content: application/json: schema: $ref: "#/components/schemas/wannaBeThing" deprecated: true responses: "200": x-an-extension-null: null x-an-extension-primitive: 1 x-an-extension-array: [] x-an-extension-object: {} description: Updated headers: Location: x-an-extension-null: null x-an-extension-primitive: 1 x-an-extension-array: [] x-an-extension-object: {} description: Location of new resource schema: type: string content: application/json: schema: $ref: "#/components/schemas/thing" examples: response: value: name: Puma id: Dog "201": description: Created headers: Location: description: Location of new resource schema: type: string "204": description: Updated no content "400": description: Bad request content: application/json: schema: $ref: "#/components/schemas/error" "500": description: Server error content: application/json: schema: $ref: "#/components/schemas/serverError" "501": description: Inline schema content: application/json: schema: type: object description: why not x-an-extension-null: null x-an-extension-primitive: 1 x-an-extension-array: [] x-an-extension-object: description: "" default: $ref: "#/components/responses/serverError" servers: - url: http://localhost:8080/test - url: https://localhost:8080/test - url: ws://localhost:8080/test - url: wss://localhost:8080/test components: parameters: apiKey: in: query name: apiKey required: true schema: type: string name: name: name in: query allowEmptyValue: true schema: type: string format: password enum: - foo - bar - baz fooArr: name: fooArr in: query description: an array of array of strings no bigger than 10 characters beginning with h y or m style: pipeDelimited schema: type: array items: type: array default: - hello - me items: type: string maxLength: 10 minLength: 2 pattern: ^[hmy] uniqueItems: true default: - - hello - you - - me barInt: x-an-extension-null: null x-an-extension-primitive: 1 x-an-extension-array: [] x-an-extension-object: {} in: query description: an integer which is a multiple of 5 but bigger than 5 and no bigger than 100 name: barInt schema: type: integer minimum: 5 maximum: 100 exclusiveMinimum: true exclusiveMaximum: false multipleOf: 5 responses: serverError: description: Server error content: application/json: schema: $ref: "#/components/schemas/serverError" schemas: geo: description: A geographical coordinate type: object properties: latitude: type: number longitude: type: number wannaBeThing: x-an-extension-null: null x-an-extension-primitive: 1 x-an-extension-array: [] x-an-extension-object: {} discriminator: propertyName: name type: object properties: name: type: string required: - name thing: x-an-extension-null: null x-an-extension-primitive: 1 x-an-extension-array: [] x-an-extension-object: {} type: object properties: id: type: number name: type: string required: - id - name serverError: x-an-extension-null: null x-an-extension-primitive: 1 x-an-extension-array: [] x-an-extension-object: {} type: object properties: message: type: string location: $ref: "#/components/schemas/geo" required: - message error: x-an-extension-null: null x-an-extension-primitive: 1 x-an-extension-array: [] x-an-extension-object: {} type: object properties: messages: type: array items: type: string required: - messages