mirror of
https://github.com/postmanlabs/openapi-to-postman.git
synced 2022-11-29 22:05:00 +03:00
77 lines
1.6 KiB
YAML
77 lines
1.6 KiB
YAML
openapi: "3.0.0"
|
|
info:
|
|
version: 1.0.0
|
|
title: Swagger Petstore
|
|
license:
|
|
name: MIT
|
|
servers:
|
|
- url: http://petstore.swagger.io/v1
|
|
paths:
|
|
/pets:
|
|
post:
|
|
summary: Create a pet
|
|
operationId: createPets
|
|
tags:
|
|
- pets
|
|
parameters:
|
|
- name: Accept
|
|
in: header
|
|
required: false
|
|
schema:
|
|
type: string
|
|
- name: header-1
|
|
in: header
|
|
required: false
|
|
schema:
|
|
type: integer
|
|
format: int32
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/Pet"
|
|
responses:
|
|
'201':
|
|
description: Null response
|
|
default:
|
|
description: unexpected error
|
|
headers:
|
|
content-type:
|
|
description: content-type of response body
|
|
required: true
|
|
schema:
|
|
type: string
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/Error"
|
|
components:
|
|
schemas:
|
|
Pet:
|
|
type: object
|
|
required:
|
|
- id
|
|
- name
|
|
properties:
|
|
id:
|
|
type: integer
|
|
format: int64
|
|
name:
|
|
type: string
|
|
tag:
|
|
type: string
|
|
Pets:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/Pet"
|
|
Error:
|
|
type: object
|
|
required:
|
|
- code
|
|
- message
|
|
properties:
|
|
code:
|
|
type: integer
|
|
format: int32
|
|
message:
|
|
type: string |