swagger: "2.0" info: title: Animal API - ChatGPT description: A simple example web application for managing a collection of dogs and cats version: 1.0.0 basePath: /animals schemes: - http - https produces: - application/json paths: /dog: get: summary: Returns a random dog responses: 200: description: A random dog schema: $ref: "#/definitions/Dog" /dogs: get: summary: Returns a list of all dogs responses: 200: description: A list of dogs schema: type: array items: $ref: "#/definitions/Dog" post: summary: Creates a new dog parameters: - in: body name: body description: The dog to create required: true schema: $ref: "#/definitions/Dog" responses: 201: description: The created dog schema: $ref: "#/definitions/Dog" /dogs/{name}: get: summary: Returns a specific dog by name parameters: - in: path name: name description: The name of the dog required: true type: string responses: 200: description: A specific dog schema: $ref: "#/definitions/Dog" /cat: get: summary: Returns a random cat responses: 200: description: A random cat schema: $ref: "#/definitions/Cat" /cats: get: summary: Returns a list of all cats responses: 200: description: A list of cats schema: type: array items: $ref: "#/definitions/Cat" post: summary: Creates a new cat parameters: - in: body name: body description: The cat to create required: true schema: $ref: "#/definitions/Cat" responses: 201: description: The created cat schema: $ref: "#/definitions/Cat" /cats/{name}: get: summary: Returns a specific cat by name parameters: - in: path name: name description: The name of the cat required: true type: string responses: 200: description: A specific cat schema: $ref: "#/definitions/Cat" definitions: Dog: type: object properties: name: type: string breed: type: string age: type: integer Cat: type: object properties: name: type: string breed: type: string age: type: integer