rapipdf
Version:
RapiPdf - Generate PDF from Open API spec
168 lines • 4.3 kB
YAML
openapi: 3.0.0
info:
description: Contains all data types
version: 1.0.0
title: Testing different data-types
paths:
/person:
post:
summary: Contains parameters of various data-types and constraints in query, request-body and response
operationId: samplePost
parameters:
- name: height
in: query
description: height in inches
required: true
schema:
type: integer
format: int32
minimum: 12
maximum: 120
example: 70
- name: full-name
in: query
description: Name of a person
required: true
schema:
type: string
minimum: 3
- name: social-connection
in: query
description: facebook, linkedin, github, instagram, twitter etc
schema:
type: string
format: url
- name: email
in: query
required: true
schema:
type: string
format: email
- name: email-password
in: query
required: true
schema:
type: string
format: password
- name: date-of-birth
in: query
required: true
schema:
type: string
format: date
- name: interests
in: query
required: true
schema:
type: array
minItems: 1
maxItems: 3
items:
type: string
enum:
- computers
- hiking
- swiming
- movies
- music
- dancing
- reading
- painting
default: hiking
- name: tags
in: query
description: Add tags to the person
style: form
schema:
type: array
items:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Person'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Category'
description: order placed for purchasing the pet
required: true
components:
schemas:
Category:
type: object
properties:
id:
description: Category ID
allOf:
- $ref: '#/components/schemas/Id'
name:
description: Category name
type: string
minLength: 1
Id:
type: integer
format: int64
readOnly: true
Person:
type: object
required:
- name
- photoUrls
properties:
id:
description: Pet ID
allOf:
- $ref: '#/components/schemas/Id'
category:
description: Categories this pet belongs to
allOf:
- $ref: '#/components/schemas/Category'
name:
description: Name of the person
type: string
minLength: 4
example: Guru
photoUrls:
description: The list of URL to a cute photos featuring pet
type: array
maxItems: 20
items:
type: string
format: url
tags:
description: Tags attached to the pet
type: array
minItems: 1
items:
$ref: '#/components/schemas/Tag'
maritalStatus:
type: string
description: Pet status in the store
enum:
- married
- unmarried
- widowed
phone:
description: phone number in international format
type: string
pattern: '/^\+(?:[0-9]-?){6,14}[0-9]$/'
example: +1-202-555-0192
nullable: true
Tag:
type: object
properties:
id:
description: Tag ID
allOf:
- $ref: '#/components/schemas/Id'
name:
description: Tag name
type: string
minLength: 1