Last active
August 15, 2017 04:09
Revisions
-
iainconnor revised this gist
Aug 15, 2017 . 1 changed file with 138 additions and 39 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,49 +1,148 @@ openapi: "3.0.0" info: version: a.bc title: Swagger Petstore description: Foobar servers: - url: http://petstore.swagger.io/v1 paths: /pets: get: description: HEllo summary: List all pets operationId: listPets tags: - pets parameters: - name: limit in: query description: How many items to return at one time (max 100) required: false schema: oneOf: - $ref: "#/components/schemas/Simple" - $ref: "#/components/schemas/Simple2" responses: 200: description: An paged array of pets headers: x-next: description: A link to the next page of responses schema: type: string content: application/json: schema: $ref: "#/components/schemas/Pets" default: description: unexpected error content: application/json: schema: $ref: "#/components/schemas/Error" post: description: Creates a new pet in the store. Duplicates are allowed operationId: addPet requestBody: description: food required: true content: application/json: schema: type: object required: - lat - long properties: lat: type: number long: type: number application/x-www-form-urlencoded: schema: properties: name: type: object properties: id: type: array items: type: string status: description: Updated status of the pet type: string responses: 200: description: pet response content: application/json: schema: $ref: '#/components/schemas/Pet' default: description: unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' /pets/{petId}: get: summary: Info for a specific pet operationId: showPetById tags: - pets parameters: - name: petId in: path required: true description: The id of the pet to retrieve schema: type: string responses: 200: description: Expected response to a valid request content: application/json: schema: $ref: "#/components/schemas/Pets" default: description: unexpected error content: application/json: schema: $ref: "#/components/schemas/Error" components: schemas: Simple: items: type: string Simple2: type: integer Pet: required: - id - name properties: id: type: array items: type: string name: oneOf: - $ref: "#/components/schemas/Simple" - $ref: "#/components/schemas/Simple2" tag: type: string Pets: type: array items: $ref: "#/components/schemas/Pet" Error: required: - code - message properties: code: type: integer format: int32 message: type: string -
iainconnor revised this gist
Aug 15, 2017 . 1 changed file with 39 additions and 98 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,108 +1,49 @@ openapi: 3.0.0 info: version: '1.0' title: Demo description: 'Just a demonstration. · Generated with ❤ by GameMaker · https://github.com/iainconnor/game-maker.' servers: - url: 'http://www.mydemo.com/rest_api/foo' paths: components: schemas: Bar: type: object properties: zim: oneOf: - type: string - type: integer zam: oneOf: - type: array items: type: string - type: array items: $ref: '#/components/schemas/Fuzz' - type: boolean zuzz: type: array items: $ref: '#/components/schemas/Fizz' required: - zim - zam - zuzz Fizz: type: object properties: a: type: string Fuzz: type: object allOf: - type: object - $ref: '#/components/schemas/Fizz' - properties: b: type: boolean required: - b -
iainconnor created this gist
Aug 14, 2017 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,108 @@ openapi: 3.0.0 info: version: a.bc title: Swagger Petstore description: Foobar servers: - url: 'http://petstore.swagger.io/v1' paths: /pets: get: summary: List all pets operationId: listPets tags: - pets parameters: - name: limit in: query description: How many items to return at one time (max 100) required: false schema: oneOf: - $ref: '#/components/schemas/Pets' responses: '200': description: An paged array of pets headers: x-next: description: A link to the next page of responses schema: type: string content: application/json: schema: $ref: '#/components/schemas/Pets' default: description: unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' post: summary: Create a pet operationId: createPets tags: - pets responses: '201': description: Null response default: description: unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' '/pets/{petId}': get: summary: Info for a specific pet operationId: showPetById tags: - pets parameters: - name: petId in: path required: true description: The id of the pet to retrieve schema: type: string responses: '200': description: Expected response to a valid request content: application/json: schema: $ref: '#/components/schemas/Pets' default: description: unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' components: schemas: Pet: required: - id - name properties: id: type: integer format: int64 name: type: string tag: type: string Pets: type: array items: $ref: '#/components/schemas/Pet' Error: required: - code - message properties: code: type: integer format: int32 message: type: string