UNPKG

rapipdf

Version:

RapiPdf - Generate PDF from Open API spec

335 lines 8.8 kB
openapi: 3.0.0 info: description: This is a sample server Petstore containing a complex request body version: 1.0.0 title: Swagger Petstore termsOfService: 'http://swagger.io/terms/' contact: name: API Support email: apiteam@swagger.io url: https://github.com/Redocly/redoc tags: - name: pet description: Everything about your Pets paths: /pet: parameters: - name: cookieParam in: cookie description: Some cookie required: true schema: type: integer format: int64 post: tags: - pet summary: Add a new pet to the store description: Add new pet to the store inventory. operationId: addPet responses: '200': description: successful operation content: application/json: schema: $ref: '#/components/schemas/Pet' application/xml: schema: $ref: '#/components/schemas/Pet' requestBody: $ref: '#/components/requestBodies/Pet' components: schemas: ApiResponse: type: object properties: code: type: integer format: int32 type: type: string message: type: string Cat: description: A representation of a cat allOf: - $ref: '#/components/schemas/Pet' - type: object properties: huntingSkill: type: string description: The measured skill for hunting default: lazy enum: - clueless - lazy - adventurous - aggressive required: - huntingSkill Category: type: object properties: id: description: Category ID allOf: - $ref: '#/components/schemas/Id' name: description: Category name type: string minLength: 1 sub: description: Test Sub Category type: object properties: prop1: type: string description: Dumb Property xml: name: Category Dog: description: A representation of a dog allOf: - $ref: '#/components/schemas/Pet' - type: object properties: packSize: type: integer format: int32 description: The size of the pack the dog is from default: 1 minimum: 1 required: - packSize HoneyBee: description: A representation of a honey bee allOf: - $ref: '#/components/schemas/Pet' - type: object properties: honeyPerDay: type: number description: Average amount of honey produced per day in ounces example: 3.14 required: - honeyPerDay Id: type: integer format: int64 readOnly: true Order: type: object properties: id: description: Order ID allOf: - $ref: '#/components/schemas/Id' petId: description: Pet ID allOf: - $ref: '#/components/schemas/Id' quantity: type: integer format: int32 minimum: 1 default: 1 shipDate: description: Estimated ship date type: string format: date-time status: type: string description: Order Status enum: - placed - approved - delivered complete: description: Indicates whenever order was completed or not type: boolean default: false readOnly: true rqeuestId: description: Unique Request Id type: string writeOnly: true xml: name: Order Pet: type: object required: - name - photoUrls discriminator: propertyName: petType mapping: cat: '#/components/schemas/Cat' dog: '#/components/schemas/Dog' bee: '#/components/schemas/HoneyBee' properties: id: externalDocs: description: "Find more info here" url: "https://example.com" description: Pet ID allOf: - $ref: '#/components/schemas/Id' category: description: Categories this pet belongs to allOf: - $ref: '#/components/schemas/Category' name: description: The name given to a pet type: string example: Guru photoUrls: description: The list of URL to a cute photos featuring pet type: array maxItems: 20 xml: name: photoUrl wrapped: true items: type: string format: url friend: allOf: - $ref: '#/components/schemas/Pet' tags: description: Tags attached to the pet type: array minItems: 1 xml: name: tag wrapped: true items: $ref: '#/components/schemas/Tag' status: type: string description: Pet status in the store enum: - available - pending - sold petType: description: Type of a pet type: string xml: name: Pet Tag: type: object properties: id: description: Tag ID allOf: - $ref: '#/components/schemas/Id' name: description: Tag name type: string minLength: 1 xml: name: Tag User: type: object properties: id: $ref: '#/components/schemas/Id' pet: oneOf: - $ref: '#/components/schemas/Pet' - $ref: '#/components/schemas/Tag' username: description: User supplied username type: string minLength: 4 example: John78 firstName: description: User first name type: string minLength: 1 example: John lastName: description: User last name type: string minLength: 1 example: Smith email: description: User email address type: string format: email example: john.smith@example.com password: type: string description: >- User password, MUST contain a mix of upper and lower case letters, as well as digits format: password minLength: 8 pattern: '/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/' example: drowssaP123 phone: description: User phone number in international format type: string pattern: '/^\+(?:[0-9]-?){6,14}[0-9]$/' example: +1-202-555-0192 nullable: true userStatus: description: User status type: integer format: int32 xml: name: User requestBodies: Pet: content: application/json: schema: allOf: - description: My Pet title: Pettie - $ref: '#/components/schemas/Pet' application/xml: schema: type: 'object' properties: name: type: string description: hooray description: Pet object that needs to be added to the store required: true UserArray: content: application/json: schema: type: array items: $ref: '#/components/schemas/User' description: List of user object required: true securitySchemes: petstore_auth: description: | Get access to data while protecting your account credentials. OAuth2 is also a safer and more secure way to give you access. type: oauth2 flows: implicit: authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog' scopes: 'write:pets': modify pets in your account 'read:pets': read your pets api_key: description: > For this sample, you can use the api key `special-key` to test the authorization filters. type: apiKey name: api_key in: header examples: Order: value: quantity: 1, shipDate: 2018-10-19T16:46:45Z, status: placed, complete: false