# Small OpenAPI 3 example for PolyApiIDE import (YAML).
openapi: 3.0.3
info:
  title: Example Pets API
  version: 1.0.0
  description: >
    Tiny OpenAPI 3 spec with two paths.
    Import this file as OpenAPI in PolyApiIDE.
servers:
  - url: https://api.example.com/v1
    description: Example server
paths:
  /pets:
    get:
      operationId: listPets
      summary: List pets
      tags:
        - pets
      parameters:
        - name: limit
          in: query
          required: false
          description: Max items to return
          schema:
            type: integer
            default: 20
      responses:
        "200":
          description: A list of pets
    post:
      operationId: createPet
      summary: Create a pet
      tags:
        - pets
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  example: Rex
                tag:
                  type: string
      responses:
        "201":
          description: Created
  /pets/{id}:
    get:
      operationId: getPet
      summary: Get a pet by id
      tags:
        - pets
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: A pet
