Last active
January 24, 2019 10:48
-
-
Save dolmen/a8df78a79503d71307bb8f6c30544550 to your computer and use it in GitHub Desktop.
Mini Swagger spec not validated by online.swagger.io/validator
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 characters
swagger: "2.0" | |
info: | |
version: "1.0.0" | |
title: "Swagger Petstore" | |
license: | |
name: "Apache 2.0" | |
url: "http://www.apache.org/licenses/LICENSE-2.0.html" | |
host: "petstore.swagger.io" | |
basePath: "/v2" | |
tags: | |
- name: "pet" | |
description: "Everything about your Pets" | |
externalDocs: | |
description: "Find out more" | |
url: "http://swagger.io" | |
schemes: | |
- "https" | |
- "http" | |
parameters: | |
petId: | |
name: "petId" | |
in: "path" | |
description: "ID of pet to return" | |
required: true | |
type: "integer" | |
format: "int64" | |
paths: | |
/pet/{petId}: | |
parameters: | |
- $ref: "#/parameters/petId" | |
get: | |
tags: | |
- "pet" | |
summary: "Find pet by ID" | |
description: "Returns a single pet" | |
operationId: "getPetById" | |
produces: | |
- "application/json" | |
responses: | |
200: | |
description: "successful operation" | |
schema: | |
$ref: "#/definitions/Pet" | |
definitions: | |
Category: | |
type: "object" | |
properties: | |
id: | |
type: "integer" | |
format: "int64" | |
name: | |
type: "string" | |
xml: | |
name: "Category" | |
Tag: | |
type: "object" | |
properties: | |
id: | |
type: "integer" | |
format: "int64" | |
name: | |
type: "string" | |
xml: | |
name: "Tag" | |
Pet: | |
type: "object" | |
required: | |
- "name" | |
- "photoUrls" | |
properties: | |
id: | |
type: "integer" | |
format: "int64" | |
category: | |
$ref: "#/definitions/Category" | |
name: | |
type: "string" | |
example: "doggie" | |
photoUrls: | |
type: "array" | |
xml: | |
name: "photoUrl" | |
wrapped: true | |
items: | |
type: "string" | |
tags: | |
type: "array" | |
xml: | |
name: "tag" | |
wrapped: true | |
items: | |
$ref: "#/definitions/Tag" | |
status: | |
type: "string" | |
description: "pet status in the store" | |
enum: | |
- "available" | |
- "pending" | |
- "sold" | |
xml: | |
name: "Pet" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment