Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
OpenAPI Specification (fka Swagger Specification) tutorial files from [API Handyman blog](http://apihandyman.io)

Open API Specification (fka Swagger Specification) tutorial

All these Gist files are explained on my Open API Specification (fka Swagger Specification) tutorial on API Handyman blog.

The tutorial

This tutorial is composed of several posts, here are the posts links and files used for each one:

The OpenAPI Specification

If you're a bit lost in the specification, take a look at my [visual documentation:

![OpenAPISpecificationVisualDocumentation](http://apihandyman.io/wp-content/uploads/2016/02/OpenAPI-Specification-Visual-Documentation.png "OpenAPI Specification Visual Documentation") ](http://openapi-specification-visual-documentation.apihandyman.io/)
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Simple API",
"description": "A simple API to learn how to write OpenAPI Specification"
},
"schemes": [
"https"
],
"host": "simple.api",
"basePath": "/openapi101",
"paths": {
"/persons": {
"get": {
"summary": "Gets some persons",
"description": "Returns a list containing all persons.",
"responses": {
"200": {
"description": "A list of Person",
"schema": {
"type": "array",
"items": {
"properties": {
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"username": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
swagger: "2.0"
info:
version: 1.0.0
title: Simple API
description: A simple API to learn how to write OpenAPI Specification
schemes:
- https
host: simple.api
basePath: /openapi101
paths: {}
swagger: "2.0"
info:
version: 1.0.0
title: Simple API
description: A simple API to learn how to write OpenAPI Specification
schemes:
- https
host: simple.api
basePath: /openapi101
paths:
/persons:
get:
summary: Gets some persons
description: Returns a list containing all persons.
responses:
200:
description: A list of Person
schema:
type: array
items:
required:
- username
properties:
firstName:
type: string
lastName:
type: string
username:
type: string
swagger: "2.0"
info:
version: 1.0.0
title: Simple API
description: A simple API to learn how to write OpenAPI Specification
schemes:
- https
host: simple.api
basePath: /openapi101
paths:
/persons:
get:
summary: Gets some persons
description: Returns a list containing all persons. The list supports paging.
parameters:
- name: pageSize
in: query
description: Number of persons returned
type: integer
- name: pageNumber
in: query
description: Page number
type: integer
responses:
200:
description: A list of Person
schema:
type: array
items:
required:
- username
properties:
firstName:
type: string
lastName:
type: string
username:
type: string
swagger: "2.0"
info:
version: 1.0.0
title: Simple API
description: A simple API to learn how to write OpenAPI Specification
schemes:
- https
host: simple.api
basePath: /openapi101
paths:
/persons:
get:
summary: Gets some persons
description: Returns a list containing all persons. The list supports paging.
parameters:
- name: pageSize
in: query
description: Number of persons returned
type: integer
- name: pageNumber
in: query
description: Page number
type: integer
responses:
200:
description: A list of Person
schema:
type: array
items:
required:
- username
properties:
firstName:
type: string
lastName:
type: string
username:
type: string
/persons/{username}:
get:
summary: Gets a person
description: Returns a single person for its username
parameters:
- name: username
in: path
required: true
description: The person's username
type: string
responses:
200:
description: A Person
schema:
required:
- username
properties:
firstName:
type: string
lastName:
type: string
username:
type: string
404:
description: The Person does not exists.
swagger: "2.0"
info:
version: 1.0.0
title: Simple API
description: A simple API to learn how to write OpenAPI Specification
schemes:
- https
host: simple.api
basePath: /openapi101
paths:
/persons:
get:
summary: Gets some persons
description: Returns a list containing all persons. The list supports paging.
parameters:
- name: pageSize
in: query
description: Number of persons returned
type: integer
- name: pageNumber
in: query
description: Page number
type: integer
responses:
200:
description: A list of Person
schema:
type: array
items:
required:
- username
properties:
firstName:
type: string
lastName:
type: string
username:
type: string
post:
summary: Creates a person
description: Adds a new person to the persons list.
parameters:
- name: person
in: body
description: The person to create.
schema:
required:
- username
properties:
firstName:
type: string
lastName:
type: string
username:
type: string
responses:
204:
description: Persons succesfully created.
400:
description: Persons couldn't have been created.
/persons/{username}:
get:
summary: Gets a person
description: Returns a single person for its username.
parameters:
- name: username
in: path
required: true
description: The person's username
type: string
responses:
200:
description: A Person
schema:
required:
- username
properties:
firstName:
type: string
lastName:
type: string
username:
type: string
404:
description: The Person does not exists.
swagger: "2.0"
info:
version: 1.0.0
title: Simple API
description: A simple API to learn how to write OpenAPI Specification
schemes:
- https
host: simple.api
basePath: /openapi101
paths:
/persons:
get:
summary: Gets some persons
description: Returns a list containing all persons. The list supports paging.
parameters:
- name: pageSize
in: query
description: Number of persons returned
type: integer
- name: pageNumber
in: query
description: Page number
type: integer
responses:
200:
description: A list of Person
schema:
$ref: "#/definitions/Persons"
post:
summary: Creates a person
description: Adds a new person to the persons list.
parameters:
- name: person
in: body
description: The person to create.
schema:
$ref: "#/definitions/Person"
responses:
204:
description: Persons succesfully created.
400:
description: Persons couldn't have been created.
/persons/{username}:
get:
summary: Gets a person
description: Returns a single person for its username.
parameters:
- name: username
in: path
required: true
description: The person's username
type: string
responses:
200:
description: A Person
schema:
$ref: "#/definitions/Person"
404:
description: The Person does not exists.
definitions:
Person:
required:
- username
properties:
firstName:
type: string
lastName:
type: string
username:
type: string
Persons:
type: array
items:
$ref: "#/definitions/Person"
swagger: "2.0"
info:
version: 1.0.0
title: Simple API
description: A simple API to learn how to write OpenAPI Specification
schemes:
- https
host: simple.api
basePath: /openapi101
paths:
/persons:
get:
summary: Gets some persons
description: Returns a list containing all persons. The list supports paging.
parameters:
- name: pageSize
in: query
description: Number of persons returned
type: integer
- name: pageNumber
in: query
description: Page number
type: integer
responses:
200:
description: A list of Person
schema:
$ref: "#/definitions/Persons"
500:
description: An unexpected error occured.
schema:
properties:
code:
type: string
message:
type: string
post:
summary: Creates a person
description: Adds a new person to the persons list.
parameters:
- name: person
in: body
description: The person to create.
schema:
$ref: "#/definitions/Person"
responses:
204:
description: Persons succesfully created.
400:
description: Persons couldn't have been created.
500:
description: An unexpected error occured.
schema:
properties:
code:
type: string
message:
type: string
/persons/{username}:
get:
summary: Gets a person
description: Returns a single person for its username.
parameters:
- name: username
in: path
required: true
description: The person's username
type: string
responses:
200:
description: A Person
schema:
$ref: "#/definitions/Person"
404:
description: The Person does not exists.
500:
description: An unexpected error occured.
schema:
properties:
code:
type: string
message:
type: string
definitions:
Person:
required:
- username
properties:
firstName:
type: string
lastName:
type: string
username:
type: string
Persons:
type: array
items:
$ref: "#/definitions/Person"
swagger: "2.0"
info:
version: 1.0.0
title: Simple API
description: A simple API to learn how to write OpenAPI Specification
schemes:
- https
host: simple.api
basePath: /openapi101
paths:
/persons:
get:
summary: Gets some persons
description: Returns a list containing all persons. The list supports paging.
parameters:
- name: pageSize
in: query
description: Number of persons returned
type: integer
- name: pageNumber
in: query
description: Page number
type: integer
responses:
200:
description: A list of Person
schema:
$ref: "#/definitions/Persons"
500:
description: An unexpected error occured.
schema:
$ref: "#/definitions/Error"
post:
summary: Creates a person
description: Adds a new person to the persons list.
parameters:
- name: person
in: body
description: The person to create.
schema:
$ref: "#/definitions/Person"
responses:
204:
description: Persons succesfully created.
400:
description: Persons couldn't have been created.
500:
description: An unexpected error occured.
schema:
$ref: "#/definitions/Error"
/persons/{username}:
get:
summary: Gets a person
description: Returns a single person for its username.
parameters:
- name: username
in: path
required: true
description: The person's username
type: string
responses:
200:
description: A Person
schema:
$ref: "#/definitions/Person"
404:
description: The Person does not exists.
500:
description: An unexpected error occured.
schema:
$ref: "#/definitions/Error"
definitions:
Person:
required:
- username
properties:
firstName:
type: string
lastName:
type: string
username:
type: string
Persons:
type: array
items:
$ref: "#/definitions/Person"
Error:
properties:
code:
type: string
message:
type: string
swagger: "2.0"
info:
version: 1.0.0
title: Simple API
description: A simple API to learn how to write OpenAPI Specification
schemes:
- https
host: simple.api
basePath: /openapi101
paths:
/persons:
get:
summary: Gets some persons
description: Returns a list containing all persons. The list supports paging.
parameters:
- name: pageSize
in: query
description: Number of persons returned
type: integer
- name: pageNumber
in: query
description: Page number
type: integer
responses:
200:
description: A list of Person
schema:
$ref: "#/definitions/Persons"
500:
$ref: "#/responses/Standard500ErrorResponse"
post:
summary: Creates a person
description: Adds a new person to the persons list.
parameters:
- name: person
in: body
description: The person to create.
schema:
$ref: "#/definitions/Person"
responses:
204:
description: Persons succesfully created.
400:
description: Persons couldn't have been created.
500:
$ref: "#/responses/Standard500ErrorResponse"
/persons/{username}:
get:
summary: Gets a person
description: Returns a single person for its username.
parameters:
- name: username
in: path
required: true
description: The person's username
type: string
responses:
200:
description: A Person
schema:
$ref: "#/definitions/Person"
404:
description: The Person does not exists.
500:
$ref: "#/responses/Standard500ErrorResponse"
definitions:
Person:
required:
- username
properties:
firstName:
type: string
lastName:
type: string
username:
type: string
Persons:
type: array
items:
$ref: "#/definitions/Person"
Error:
properties:
code:
type: string
message:
type: string
responses:
Standard500ErrorResponse:
description: An unexpected error occured.
schema:
$ref: "#/definitions/Error"
swagger: "2.0"
info:
version: 1.0.0
title: Simple API
description: A simple API to learn how to write OpenAPI Specification
schemes:
- https
host: simple.api
basePath: /openapi101
paths:
/persons:
get:
summary: Gets some persons
description: Returns a list containing all persons. The list supports paging.
parameters:
- name: pageSize
in: query
description: Number of persons returned
type: integer
- name: pageNumber
in: query
description: Page number
type: integer
responses:
200:
description: A list of Person
schema:
$ref: "#/definitions/Persons"
500:
$ref: "#/responses/Standard500ErrorResponse"
post:
summary: Creates a person
description: Adds a new person to the persons list.
parameters:
- name: person
in: body
description: The person to create.
schema:
$ref: "#/definitions/Person"
responses:
204:
description: Person succesfully created.
400:
description: Person couldn't have been created.
500:
$ref: "#/responses/Standard500ErrorResponse"
/persons/{username}:
get:
summary: Gets a person
description: Returns a single person for its username.
parameters:
- name: username
in: path
required: true
description: The person's username
type: string
responses:
200:
description: A Person
schema:
$ref: "#/definitions/Person"
404:
$ref: "#/responses/PersonDoesNotExistResponse"
500:
$ref: "#/responses/Standard500ErrorResponse"
delete:
summary: Deletes a person
description: Delete a single person identified via its username
parameters:
- name: username
in: path
required: true
description: The person's username
type: string
responses:
204:
description: Person successfully deleted.
404:
$ref: "#/responses/PersonDoesNotExistResponse"
500:
$ref: "#/responses/Standard500ErrorResponse"
definitions:
Person:
required:
- username
properties:
firstName:
type: string
lastName:
type: string
username:
type: string
Persons:
type: array
items:
$ref: "#/definitions/Person"
Error:
required:
- code
- message
properties:
code:
type: string
message:
type: string
responses:
Standard500ErrorResponse:
description: An unexpected error occured.
schema:
$ref: "#/definitions/Error"
PersonDoesNotExistResponse:
description: Person does not exist.
swagger: "2.0"
info:
version: 1.0.0
title: Simple API
description: A simple API to learn how to write OpenAPI Specification
schemes:
- https
host: simple.api
basePath: /openapi101
paths:
/persons:
get:
summary: Gets some persons
description: Returns a list containing all persons. The list supports paging.
parameters:
- name: pageSize
in: query
description: Number of persons returned
type: integer
- name: pageNumber
in: query
description: Page number
type: integer
responses:
200:
description: A list of Person
schema:
$ref: "#/definitions/Persons"
500:
$ref: "#/responses/Standard500ErrorResponse"
post:
summary: Creates a person
description: Adds a new person to the persons list.
parameters:
- name: person
in: body
description: The person to create.
schema:
$ref: "#/definitions/Person"
responses:
204:
description: Person succesfully created.
400:
description: Person couldn't have been created.
500:
$ref: "#/responses/Standard500ErrorResponse"
/persons/{username}:
parameters:
- name: username
in: path
required: true
description: The person's username
type: string
get:
summary: Gets a person
description: Returns a single person for its username.
responses:
200:
description: A Person
schema:
$ref: "#/definitions/Person"
404:
$ref: "#/responses/PersonDoesNotExistResponse"
500:
$ref: "#/responses/Standard500ErrorResponse"
delete:
summary: Deletes a person
description: Delete a single person identified via its username
responses:
204:
description: Person successfully deleted.
404:
$ref: "#/responses/PersonDoesNotExistResponse"
500:
$ref: "#/responses/Standard500ErrorResponse"
definitions:
Person:
required:
- username
properties:
firstName:
type: string
lastName:
type: string
username:
type: string
Persons:
type: array
items:
$ref: "#/definitions/Person"
Error:
required:
- code
- message
properties:
code:
type: string
message:
type: string
responses:
Standard500ErrorResponse:
description: An unexpected error occured.
schema:
$ref: "#/definitions/Error"
PersonDoesNotExistResponse:
description: Person does not exist.
swagger: "2.0"
info:
version: 1.0.0
title: Simple API
description: A simple API to learn how to write OpenAPI Specification
schemes:
- https
host: simple.api
basePath: /openapi101
paths:
/persons:
get:
summary: Gets some persons
description: Returns a list containing all persons. The list supports paging.
parameters:
- name: pageSize
in: query
description: Number of persons returned
type: integer
- name: pageNumber
in: query
description: Page number
type: integer
responses:
200:
description: A list of Person
schema:
$ref: "#/definitions/Persons"
500:
$ref: "#/responses/Standard500ErrorResponse"
post:
summary: Creates a person
description: Adds a new person to the persons list.
parameters:
- name: person
in: body
description: The person to create.
schema:
$ref: "#/definitions/Person"
responses:
204:
description: Person succesfully created.
400:
description: Person couldn't have been created.
500:
$ref: "#/responses/Standard500ErrorResponse"
/persons/{username}:
parameters:
- name: username
in: path
required: true
description: The person's username
type: string
get:
summary: Gets a person
description: Returns a single person for its username.
responses:
200:
description: A Person
schema:
$ref: "#/definitions/Person"
404:
$ref: "#/responses/PersonDoesNotExistResponse"
500:
$ref: "#/responses/Standard500ErrorResponse"
delete:
summary: Deletes a person
description: Delete a single person identified via its username
responses:
204:
description: Person successfully deleted.
404:
$ref: "#/responses/PersonDoesNotExistResponse"
500:
$ref: "#/responses/Standard500ErrorResponse"
/persons/{username}/friends:
parameters:
- name: username
in: path
required: true
description: The person's username
type: string
get:
summary: Gets a person's friends
description: Returns a list containing all persons. The list supports paging.
parameters:
- name: pageSize
in: query
description: Number of persons returned
type: integer
- name: pageNumber
in: query
description: Page number
type: integer
responses:
200:
description: A person's friends list
schema:
$ref: "#/definitions/Persons"
404:
$ref: "#/responses/PersonDoesNotExistResponse"
500:
$ref: "#/responses/Standard500ErrorResponse"
definitions:
Person:
required:
- username
properties:
firstName:
type: string
lastName:
type: string
username:
type: string
Persons:
type: array
items:
$ref: "#/definitions/Person"
Error:
required:
- code
- message
properties:
code:
type: string
message:
type: string
responses:
Standard500ErrorResponse:
description: An unexpected error occured.
schema:
$ref: "#/definitions/Error"
PersonDoesNotExistResponse:
description: Person does not exist.
swagger: "2.0"
info:
version: 1.0.0
title: Simple API
description: A simple API to learn how to write OpenAPI Specification
schemes:
- https
host: simple.api
basePath: /openapi101
paths:
/persons:
get:
summary: Gets some persons
description: Returns a list containing all persons. The list supports paging.
parameters:
- $ref: "#/parameters/pageSize"
- $ref: "#/parameters/pageNumber"
responses:
200:
description: A list of Person
schema:
$ref: "#/definitions/Persons"
500:
$ref: "#/responses/Standard500ErrorResponse"
post:
summary: Creates a person
description: Adds a new person to the persons list.
parameters:
- name: person
in: body
description: The person to create.
schema:
$ref: "#/definitions/Person"
responses:
204:
description: Person succesfully created.
400:
description: Person couldn't have been created.
500:
$ref: "#/responses/Standard500ErrorResponse"
/persons/{username}:
parameters:
- $ref: "#/parameters/username"
get:
summary: Gets a person
description: Returns a single person for its username.
responses:
200:
description: A Person
schema:
$ref: "#/definitions/Person"
404:
$ref: "#/responses/PersonDoesNotExistResponse"
500:
$ref: "#/responses/Standard500ErrorResponse"
delete:
summary: Deletes a person
description: Delete a single person identified via its username
responses:
204:
description: Person successfully deleted.
404:
$ref: "#/responses/PersonDoesNotExistResponse"
500:
$ref: "#/responses/Standard500ErrorResponse"
/persons/{username}/friends:
parameters:
- $ref: "#/parameters/username"
get:
summary: Gets a person's friends
description: Returns a list containing all persons. The list supports paging.
parameters:
- $ref: "#/parameters/pageSize"
- $ref: "#/parameters/pageNumber"
responses:
200:
description: A person's friends list
schema:
$ref: "#/definitions/Persons"
404:
$ref: "#/responses/PersonDoesNotExistResponse"
500:
$ref: "#/responses/Standard500ErrorResponse"
definitions:
Person:
required:
- username
properties:
firstName:
type: string
lastName:
type: string
username:
type: string
Persons:
type: array
items:
$ref: "#/definitions/Person"
Error:
required:
- code
- message
properties:
code:
type: string
message:
type: string
responses:
Standard500ErrorResponse:
description: An unexpected error occured.
schema:
$ref: "#/definitions/Error"
PersonDoesNotExistResponse:
description: Person does not exist.
parameters:
username:
name: username
in: path
required: true
description: The person's username
type: string
pageSize:
name: pageSize
in: query
description: Number of persons returned
type: integer
pageNumber:
name: pageNumber
in: query
description: Page number
type: integer
swagger: "2.0"
info:
version: 1.0.0
title: Simple API
description: A simple API to learn how to write OpenAPI Specification
schemes:
- https
host: simple.api
basePath: /openapi101
paths:
/persons:
get:
summary: Gets some persons
description: Returns a list containing all persons. The list supports paging.
parameters:
- $ref: "#/parameters/pageSize"
- $ref: "#/parameters/pageNumber"
responses:
200:
description: A list of Person
schema:
$ref: "#/definitions/Persons"
500:
$ref: "#/responses/Standard500ErrorResponse"
post:
summary: Creates a person
description: Adds a new person to the persons list.
parameters:
- name: person
in: body
description: The person to create.
schema:
$ref: "#/definitions/Person"
responses:
204:
description: Person succesfully created.
400:
description: Person couldn't have been created.
500:
$ref: "#/responses/Standard500ErrorResponse"
/persons/{username}:
parameters:
- $ref: "#/parameters/username"
get:
summary: Gets a person
description: Returns a single person for its username.
responses:
200:
description: A Person
schema:
$ref: "#/definitions/Person"
404:
$ref: "#/responses/PersonDoesNotExistResponse"
500:
$ref: "#/responses/Standard500ErrorResponse"
delete:
summary: Deletes a person
description: Delete a single person identified via its username
responses:
204:
description: Person successfully deleted.
404:
$ref: "#/responses/PersonDoesNotExistResponse"
500:
$ref: "#/responses/Standard500ErrorResponse"
/persons/{username}/friends:
parameters:
- $ref: "#/parameters/username"
get:
summary: Gets a person's friends
description: Returns a list containing all persons. The list supports paging.
parameters:
- $ref: "#/parameters/pageSize"
- $ref: "#/parameters/pageNumber"
responses:
200:
description: A person's friends list
schema:
$ref: "#/definitions/PagedPersons"
404:
$ref: "#/responses/PersonDoesNotExistResponse"
500:
$ref: "#/responses/Standard500ErrorResponse"
/persons/{username}/collectingItems:
parameters:
- $ref: "#/parameters/username"
get:
summary: Gets a person's collecting items list
description: Returns a list containing all items this person is looking for. The list supports paging.
parameters:
- $ref: "#/parameters/pageSize"
- $ref: "#/parameters/pageNumber"
responses:
200:
description: A collected items list
schema:
$ref: "#/definitions/PagedCollectingItems"
404:
$ref: "#/responses/PersonDoesNotExistResponse"
500:
$ref: "#/responses/Standard500ErrorResponse"
definitions:
Person:
required:
- username
properties:
firstName:
type: string
lastName:
type: string
username:
type: string
pattern: "[a-z0-9]{8,64}"
minLength: 8
maxLength: 64
dateOfBirth:
type: string
format: date
lastTimeOnline:
type: string
format: date-time
readOnly: true
avatarBase64PNG:
type: string
format: byte
spokenLanguages:
$ref: "#/definitions/SpokenLanguages"
SpokenLanguages:
additionalProperties:
type: string
Persons:
properties:
items:
type: array
minItems: 10
maxItems: 100
uniqueItems: true
items:
$ref: "#/definitions/Person"
ErrorMessage:
properties:
longMessage:
type: string
shortMessage:
type: string
MultilingualErrorMessage:
additionalProperties:
$ref: "#/definitions/ErrorMessage"
properties:
defaultLanguage:
$ref: "#/definitions/ErrorMessage"
Error:
required:
- code
- message
properties:
code:
type: string
enum:
- DBERR
- NTERR
- UNERR
message:
$ref: "#/definitions/MultilingualErrorMessage"
CollectingItem:
discriminator: itemType
required:
- itemType
properties:
itemType:
type: string
enum:
- Vinyl
- VHS
imageId:
type: string
maxPrice:
type: number
format: double
minimum: 0
maximum: 10000
exclusiveMinimum: true
exclusiveMaximum: false
Vinyl:
allOf:
- $ref: "#/definitions/CollectingItem"
- required:
- albumName
- artist
properties:
albumName:
type: string
artist:
type: string
VHS:
allOf:
- $ref: "#/definitions/CollectingItem"
- required:
- movieTitle
properties:
movieTitle:
type: string
director:
type: string
PagedPersonsV1:
properties:
items:
type: array
items:
$ref: "#/definitions/Person"
totalItems:
type: integer
totalPages:
type: integer
pageSize:
type: integer
currentPage:
type: integer
PagedPersonsV2:
properties:
items:
type: array
items:
$ref: "#/definitions/Person"
paging:
$ref: "#/definitions/Paging"
Paging:
properties:
totalItems:
type: integer
totalPages:
type: integer
pageSize:
type: integer
currentPage:
type: integer
PagedPersons:
allOf:
- $ref: "#/definitions/Persons"
- $ref: "#/definitions/Paging"
PagedCollectingItems:
allOf:
- properties:
items:
type: array
minItems: 10
maxItems: 100
uniqueItems: true
items:
$ref: "#/definitions/CollectingItem"
- $ref: "#/definitions/Paging"
responses:
Standard500ErrorResponse:
description: An unexpected error occured.
schema:
$ref: "#/definitions/Error"
PersonDoesNotExistResponse:
description: Person does not exist.
parameters:
username:
name: username
in: path
required: true
description: The person's username
type: string
pageSize:
name: pageSize
in: query
description: Number of persons returned
type: integer
format: int32
minimum: 0
exclusiveMinimum: true
maximum: 100
exclusiveMaximum: false
multipleOf: 10
pageNumber:
name: pageNumber
in: query
description: Page number
type: integer
swagger: '2.0'
info:
version: 1.1.0
title: Simple API
description: A simple API to learn how to write OpenAPI Specification
schemes:
- https
host: simple.api
basePath: /openapi101
consumes:
- application/json
- application/x-yaml
produces:
- application/json
- application/x-yaml
paths:
/persons:
parameters:
- $ref: '#/parameters/userAgent'
get:
summary: Gets some persons
description: Returns a list containing all persons. The list supports paging.
parameters:
- $ref: '#/parameters/pageSize'
- $ref: '#/parameters/pageNumber'
- $ref: '#/parameters/includeNonVerifiedUsers'
- $ref: '#/parameters/sortPersons'
responses:
'200':
description: A list of Person
schema:
$ref: '#/definitions/Persons'
headers:
X-Rate-Limit-Remaining:
type: integer
X-Rate-Limit-Reset:
type: string
format: date-time
'500':
$ref: '#/responses/Standard500ErrorResponse'
default:
$ref: '#/responses/TotallyUnexpectedResponse'
post:
summary: Creates a person
description: Adds a new person to the persons list.
parameters:
- name: person
in: body
required: true
description: The person to create.
schema:
$ref: '#/definitions/Person'
responses:
'204':
description: Person succesfully created.
headers:
X-Rate-Limit-Remaining:
type: integer
X-Rate-Limit-Reset:
type: string
format: date-time
'400':
description: Person couldn't have been created.
headers:
X-Rate-Limit-Remaining:
type: integer
X-Rate-Limit-Reset:
type: string
format: date-time
'500':
$ref: '#/responses/Standard500ErrorResponse'
default:
$ref: '#/responses/TotallyUnexpectedResponse'
/js-less-consumer-persons:
parameters:
- $ref: '#/parameters/userAgent'
post:
summary: Creates a person
description: For JS-less partners
consumes:
- application/x-www-form-urlencoded
produces:
- text/html
parameters:
- name: username
in: formData
required: true
pattern: '[a-z0-9]{8,64}'
minLength: 8
maxLength: 64
type: string
- name: firstname
in: formData
type: string
- name: lastname
in: formData
type: string
- name: dateOfBirth
in: formData
type: string
format: date
responses:
'204':
description: Person succesfully created.
headers:
X-Rate-Limit-Remaining:
type: integer
X-Rate-Limit-Reset:
type: string
format: date-time
'400':
description: Person couldn't have been created.
headers:
X-Rate-Limit-Remaining:
type: integer
X-Rate-Limit-Reset:
type: string
format: date-time
'500':
description: An error occured.
headers:
X-Rate-Limit-Remaining:
type: integer
X-Rate-Limit-Reset:
type: string
format: date-time
default:
$ref: '#/responses/TotallyUnexpectedResponse'
'/persons/{username}':
parameters:
- $ref: '#/parameters/username'
- $ref: '#/parameters/userAgent'
get:
summary: Gets a person
description: Returns a single person for its username.
responses:
'200':
description: A Person
schema:
$ref: '#/definitions/Person'
headers:
X-Rate-Limit-Remaining:
type: integer
X-Rate-Limit-Reset:
type: string
format: date-time
'404':
$ref: '#/responses/PersonDoesNotExistResponse'
'500':
$ref: '#/responses/Standard500ErrorResponse'
default:
$ref: '#/responses/TotallyUnexpectedResponse'
delete:
summary: Deletes a person
description: Delete a single person identified via its username
responses:
'204':
description: Person successfully deleted.
headers:
X-Rate-Limit-Remaining:
type: integer
X-Rate-Limit-Reset:
type: string
format: date-time
'404':
$ref: '#/responses/PersonDoesNotExistResponse'
'500':
$ref: '#/responses/Standard500ErrorResponse'
default:
$ref: '#/responses/TotallyUnexpectedResponse'
'/persons/{username}/friends':
parameters:
- $ref: '#/parameters/username'
- $ref: '#/parameters/userAgent'
get:
summary: Gets a person's friends
description: Returns a list containing all persons. The list supports paging.
parameters:
- $ref: '#/parameters/pageSize'
- $ref: '#/parameters/pageNumber'
- $ref: '#/parameters/includeNonVerifiedUsers'
- $ref: '#/parameters/sortPersons'
responses:
'200':
description: A person's friends list
schema:
$ref: '#/definitions/PagedPersons'
headers:
X-Rate-Limit-Remaining:
type: integer
X-Rate-Limit-Reset:
type: string
format: date-time
'404':
$ref: '#/responses/PersonDoesNotExistResponse'
'500':
$ref: '#/responses/Standard500ErrorResponse'
default:
$ref: '#/responses/TotallyUnexpectedResponse'
'/persons/{username}/collecting-items':
parameters:
- $ref: '#/parameters/username'
- $ref: '#/parameters/userAgent'
get:
summary: Gets a person's collecting items list
description: >-
Returns a list containing all items this person is looking for. The list
supports paging.
parameters:
- $ref: '#/parameters/pageSize'
- $ref: '#/parameters/pageNumber'
- $ref: '#/parameters/filterItemTypes'
responses:
'200':
description: A collected items list
schema:
$ref: '#/definitions/PagedCollectingItems'
headers:
X-Rate-Limit-Remaining:
type: integer
X-Rate-Limit-Reset:
type: string
format: date-time
'404':
$ref: '#/responses/PersonDoesNotExistResponse'
'500':
$ref: '#/responses/Standard500ErrorResponse'
default:
$ref: '#/responses/TotallyUnexpectedResponse'
/images:
parameters:
- $ref: '#/parameters/userAgent'
post:
summary: Uploads an image
consumes:
- multipart/form-data
parameters:
- name: image
in: formData
type: file
responses:
'200':
description: Image's ID
schema:
properties:
imageId:
type: string
headers:
X-Rate-Limit-Remaining:
type: integer
X-Rate-Limit-Reset:
type: string
format: date-time
'500':
$ref: '#/responses/Standard500ErrorResponse'
default:
$ref: '#/responses/TotallyUnexpectedResponse'
/images/{imageId}:
parameters:
- $ref: '#/parameters/userAgent'
get:
summary: Gets an image
parameters:
- name: imageId
in: path
required: true
type: string
produces:
- image/png
- image/gif
- image/jpeg
- application/json
- application/x-yaml
responses:
'200':
description: The image
headers:
X-Rate-Limit-Remaining:
type: integer
X-Rate-Limit-Reset:
type: string
format: date-time
'404':
description: Image do not exists
headers:
X-Rate-Limit-Remaining:
type: integer
X-Rate-Limit-Reset:
type: string
format: date-time
'500':
$ref: '#/responses/Standard500ErrorResponse'
default:
$ref: '#/responses/TotallyUnexpectedResponse'
definitions:
Person:
required:
- username
properties:
firstName:
type: string
lastName:
type: string
username:
type: string
pattern: '[a-z0-9]{8,64}'
minLength: 8
maxLength: 64
dateOfBirth:
type: string
format: date
lastTimeOnline:
type: string
format: date-time
readOnly: true
avatarBase64PNG:
type: string
format: byte
default: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAC4jAAAuIwF4pT92AAABy2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgN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K+Q+yb6A0rpIEuWnO5VYI2BeawanwQT2Zw586Zw7uT+H80X6vv56/SkgAAAABJRU5ErkJggg==
spokenLanguages:
$ref: '#/definitions/SpokenLanguages'
SpokenLanguages:
additionalProperties:
type: string
properties:
defaultLanguage:
type: string
default: english
Persons:
required:
- items
properties:
items:
type: array
minItems: 10
maxItems: 100
uniqueItems: true
items:
$ref: '#/definitions/Person'
ErrorMessage:
required:
- longMessage
- shortMessage
properties:
longMessage:
type: string
shortMessage:
type: string
MultilingualErrorMessage:
additionalProperties:
$ref: '#/definitions/ErrorMessage'
properties:
defaultLanguage:
$ref: '#/definitions/ErrorMessage'
Error:
required:
- code
- message
properties:
code:
type: string
enum:
- DBERR
- NTERR
- UNERR
message:
$ref: '#/definitions/MultilingualErrorMessage'
CollectingItem:
discriminator: itemType
required:
- itemType
properties:
itemType:
type: string
enum:
- AudioCassette
- Vinyl
- VHS
imageId:
type: string
maxPrice:
type: number
format: double
minimum: 0
maximum: 10000
exclusiveMinimum: true
exclusiveMaximum: false
Vinyl:
allOf:
- $ref: '#/definitions/CollectingItem'
- required:
- albumName
- artist
properties:
albumName:
type: string
artist:
type: string
VHS:
allOf:
- $ref: '#/definitions/CollectingItem'
- required:
- movieTitle
properties:
movieTitle:
type: string
director:
type: string
AudioCassette:
allOf:
- $ref: '#/definitions/CollectingItem'
- required:
- albumName
- artist
properties:
albumName:
type: string
artist:
type: string
Paging:
required:
- totalItems
- totalPages
- pageSize
- currentPage
properties:
totalItems:
type: integer
totalPages:
type: integer
pageSize:
type: integer
currentPage:
type: integer
PagedPersons:
allOf:
- $ref: '#/definitions/Persons'
- $ref: '#/definitions/Paging'
PagedCollectingItems:
allOf:
- properties:
items:
type: array
minItems: 10
maxItems: 100
uniqueItems: true
items:
$ref: '#/definitions/CollectingItem'
- $ref: '#/definitions/Paging'
responses:
Standard500ErrorResponse:
description: An unexpected error occured.
headers:
X-Rate-Limit-Remaining:
type: integer
X-Rate-Limit-Reset:
type: string
format: date-time
schema:
$ref: '#/definitions/Error'
PersonDoesNotExistResponse:
description: Person does not exist.
headers:
X-Rate-Limit-Remaining:
type: integer
X-Rate-Limit-Reset:
type: string
format: date-time
TotallyUnexpectedResponse:
description: A totally unexpected response
headers:
X-Rate-Limit-Remaining:
type: integer
X-Rate-Limit-Reset:
type: string
format: date-time
parameters:
username:
name: username
in: path
required: true
description: The person's username
type: string
pageSize:
name: pageSize
in: query
description: Number of persons returned
type: integer
format: int32
minimum: 0
exclusiveMinimum: true
maximum: 100
exclusiveMaximum: false
multipleOf: 10
default: 20
pageNumber:
name: pageNumber
in: query
description: Page number
type: integer
default: 1
includeNonVerifiedUsers:
name: includeNonVerifiedUsers
in: query
type: boolean
default: false
allowEmptyValue: true
sortPersons:
name: sort
in: query
type: array
uniqueItems: true
minItems: 1
maxItems: 3
collectionFormat: pipes
items:
type: string
pattern: '[-+](username|lastTimeOnline|firstname|lastname)'
default:
- -lastTimeOnline
- +username
filterItemTypes:
name: itemType
in: query
type: array
collectionFormat: multi
uniqueItems: true
items:
type: string
enum:
- AudioCassette
- Vinyl
- VHS
userAgent:
name: User-Agent
type: string
in: header
required: true
POST /js-less-persons
username=apihandyman&firstname=API&lastname=Handyman
swagger: '2.0'
info:
version: 1.1.0
title: Simple API
description: A simple API to learn how to write OpenAPI Specification
schemes:
- https
host: simple.api
basePath: /openapi101
consumes:
- application/json
- application/x-yaml
produces:
- application/json
- application/x-yaml
securityDefinitions:
UserSecurity:
type: basic
AdminSecurity:
type: basic
MediaSecurity:
type: basic
security:
- UserSecurity: []
paths:
/persons:
parameters:
- $ref: '#/parameters/userAgent'
get:
summary: Gets some persons
description: Returns a list containing all persons. The list supports paging.
parameters:
- $ref: '#/parameters/pageSize'
- $ref: '#/parameters/pageNumber'
- $ref: '#/parameters/includeNonVerifiedUsers'
- $ref: '#/parameters/sortPersons'
responses:
'200':
description: A list of Person
schema:
$ref: '#/definitions/Persons'
headers:
X-Rate-Limit-Remaining:
type: integer
X-Rate-Limit-Reset:
type: string
format: date-time
'500':
$ref: '#/responses/Standard500ErrorResponse'
default:
$ref: '#/responses/TotallyUnexpectedResponse'
post:
summary: Creates a person
description: Adds a new person to the persons list.
security:
- AdminSecurity: []
parameters:
- name: person
in: body
required: true
description: The person to create.
schema:
$ref: '#/definitions/Person'
responses:
'204':
description: Person succesfully created.
headers:
X-Rate-Limit-Remaining:
type: integer
X-Rate-Limit-Reset:
type: string
format: date-time
'400':
description: Person couldn't have been created.
headers:
X-Rate-Limit-Remaining:
type: integer
X-Rate-Limit-Reset:
type: string
format: date-time
'500':
$ref: '#/responses/Standard500ErrorResponse'
default:
$ref: '#/responses/TotallyUnexpectedResponse'
/js-less-consumer-persons:
parameters:
- $ref: '#/parameters/userAgent'
post:
summary: Creates a person
description: For JS-less partners
security:
- AdminSecurity: []
consumes:
- application/x-www-form-urlencoded
produces:
- text/html
parameters:
- name: username
in: formData
required: true
pattern: '[a-z0-9]{8,64}'
minLength: 8
maxLength: 64
type: string
- name: firstname
in: formData
type: string
- name: lastname
in: formData
type: string
- name: dateOfBirth
in: formData
type: string
format: date
responses:
'204':
description: Person succesfully created.
headers:
X-Rate-Limit-Remaining:
type: integer
X-Rate-Limit-Reset:
type: string
format: date-time
'400':
description: Person couldn't have been created.
headers:
X-Rate-Limit-Remaining:
type: integer
X-Rate-Limit-Reset:
type: string
format: date-time
'500':
description: An error occured.
headers:
X-Rate-Limit-Remaining:
type: integer
X-Rate-Limit-Reset:
type: string
format: date-time
default:
$ref: '#/responses/TotallyUnexpectedResponse'
'/persons/{username}':
parameters:
- $ref: '#/parameters/username'
- $ref: '#/parameters/userAgent'
get:
summary: Gets a person
description: Returns a single person for its username.
responses:
'200':
description: A Person
schema:
$ref: '#/definitions/Person'
headers:
X-Rate-Limit-Remaining:
type: integer
X-Rate-Limit-Reset:
type: string
format: date-time
'404':
$ref: '#/responses/PersonDoesNotExistResponse'
'500':
$ref: '#/responses/Standard500ErrorResponse'
default:
$ref: '#/responses/TotallyUnexpectedResponse'
delete:
summary: Deletes a person
description: Delete a single person identified via its username
responses:
'204':
description: Person successfully deleted.
headers:
X-Rate-Limit-Remaining:
type: integer
X-Rate-Limit-Reset:
type: string
format: date-time
'404':
$ref: '#/responses/PersonDoesNotExistResponse'
'500':
$ref: '#/responses/Standard500ErrorResponse'
default:
$ref: '#/responses/TotallyUnexpectedResponse'
'/persons/{username}/friends':
parameters:
- $ref: '#/parameters/username'
- $ref: '#/parameters/userAgent'
get:
summary: Gets a person's friends
description: Returns a list containing all persons. The list supports paging.
parameters:
- $ref: '#/parameters/pageSize'
- $ref: '#/parameters/pageNumber'
- $ref: '#/parameters/includeNonVerifiedUsers'
- $ref: '#/parameters/sortPersons'
responses:
'200':
description: A person's friends list
schema:
$ref: '#/definitions/PagedPersons'
headers:
X-Rate-Limit-Remaining:
type: integer
X-Rate-Limit-Reset:
type: string
format: date-time
'404':
$ref: '#/responses/PersonDoesNotExistResponse'
'500':
$ref: '#/responses/Standard500ErrorResponse'
default:
$ref: '#/responses/TotallyUnexpectedResponse'
'/persons/{username}/collecting-items':
parameters:
- $ref: '#/parameters/username'
- $ref: '#/parameters/userAgent'
get:
summary: Gets a person's collecting items list
description: >-
Returns a list containing all items this person is looking for. The list
supports paging.
parameters:
- $ref: '#/parameters/pageSize'
- $ref: '#/parameters/pageNumber'
- $ref: '#/parameters/filterItemTypes'
responses:
'200':
description: A collected items list
schema:
$ref: '#/definitions/PagedCollectingItems'
headers:
X-Rate-Limit-Remaining:
type: integer
X-Rate-Limit-Reset:
type: string
format: date-time
'404':
$ref: '#/responses/PersonDoesNotExistResponse'
'500':
$ref: '#/responses/Standard500ErrorResponse'
default:
$ref: '#/responses/TotallyUnexpectedResponse'
/images:
parameters:
- $ref: '#/parameters/userAgent'
post:
summary: Uploads an image
security:
- MediaSecurity: []
consumes:
- multipart/form-data
parameters:
- name: image
in: formData
type: file
responses:
'200':
description: Image's ID
schema:
properties:
imageId:
type: string
headers:
X-Rate-Limit-Remaining:
type: integer
X-Rate-Limit-Reset:
type: string
format: date-time
'500':
$ref: '#/responses/Standard500ErrorResponse'
default:
$ref: '#/responses/TotallyUnexpectedResponse'
/images/{imageId}:
parameters:
- $ref: '#/parameters/userAgent'
get:
summary: Gets an image
parameters:
- name: imageId
in: path
required: true
type: string
produces:
- image/png
- image/gif
- image/jpeg
- application/json
- application/x-yaml
responses:
'200':
description: The image
headers:
X-Rate-Limit-Remaining:
type: integer
X-Rate-Limit-Reset:
type: string
format: date-time
'404':
description: Image do not exists
headers:
X-Rate-Limit-Remaining:
type: integer
X-Rate-Limit-Reset:
type: string
format: date-time
'500':
$ref: '#/responses/Standard500ErrorResponse'
default:
$ref: '#/responses/TotallyUnexpectedResponse'
definitions:
Person:
required:
- username
properties:
firstName:
type: string
lastName:
type: string
username:
type: string
pattern: '[a-z0-9]{8,64}'
minLength: 8
maxLength: 64
dateOfBirth:
type: string
format: date
lastTimeOnline:
type: string
format: date-time
readOnly: true
avatarBase64PNG:
type: string
format: byte
default: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAC4jAAAuIwF4pT92AAABy2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS40LjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIKICAgICAgICAgICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIj4K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OfZ/vht3p5N4BK1PmM5Cbm8sFVEZrnCmq+KNuLvrLbke880NlSHUrPLTZgTuRkv6Pkah+ABb+0ZXS1gEm6rWELgsTszNrpwHPvQFLSZ5eTzeAPaiqIoEsA+IoN9IIP5QY3TyD83Xfp0mOyMvxFLbDkFhzLmK669t4f+s7yCso4C5QO44cPYafPfEM3nj7XZw7xxwiI0HZPivG0L6c84Le48nZ4Sigi/7TThtrlsLCnWlD2J8cZoounc5TanlOAl/dAJqmoGzqFFX1PPeTXyZlyTabllmcwbhdod6OhKeSRfI4irHp5r/A1Vcsw8L5c3HDurV4ZvOj6OvrxRtvvY3unh7+fZXuumwzFjEG2cgY5BT7JZEjFhH/fkabc2Ci61PWf8R6+sOK8jJe2NUuE03+PqeRS1brbroCxUX6ZGUYAElRMrNxLX/NpUWEqm9ykPoc93HbW1ujenLixEnuIrMolbvrjtuZ/Y3jQ26Zk6KkwO6kFNxJKThK9jKgGqlwk3Ui1AStcAlzCjnJP7AiKH9UUnSVFBfjijVrcJzb8TQVAO1vwIol8+FycfMyxX140RszOt0wFs5jZ/wzuAtyY/jXQ57IjlG6xM4Th9SO0rb2drSeauPuMsl1A7duvAX/y70CZzs7lRTIaGyXLYZWtJ79to8sfZJwYb7RmFuLuImeQHdXqr3BJx2ABLK4+LL6ioXAlwRNQmCgHfX19aruyADozciCBf+OjVyUWd1IQOn1Rj0zBpBm7Blurg/SJZWVobAgD41NzeozF43izOm13GnaoTcjBtGRAdsS2oK+Q+yb6A0rpIEuWnO5VYI2BeawanwQT2Zw586Zw7uT+H80X6vv56/SkgAAAABJRU5ErkJggg==
spokenLanguages:
$ref: '#/definitions/SpokenLanguages'
SpokenLanguages:
additionalProperties:
type: string
properties:
defaultLanguage:
type: string
default: english
Persons:
required:
- items
properties:
items:
type: array
minItems: 10
maxItems: 100
uniqueItems: true
items:
$ref: '#/definitions/Person'
ErrorMessage:
required:
- longMessage
- shortMessage
properties:
longMessage:
type: string
shortMessage:
type: string
MultilingualErrorMessage:
additionalProperties:
$ref: '#/definitions/ErrorMessage'
properties:
defaultLanguage:
$ref: '#/definitions/ErrorMessage'
Error:
required:
- code
- message
properties:
code:
type: string
enum:
- DBERR
- NTERR
- UNERR
message:
$ref: '#/definitions/MultilingualErrorMessage'
CollectingItem:
discriminator: itemType
required:
- itemType
properties:
itemType:
type: string
enum:
- AudioCassette
- Vinyl
- VHS
imageId:
type: string
maxPrice:
type: number
format: double
minimum: 0
maximum: 10000
exclusiveMinimum: true
exclusiveMaximum: false
Vinyl:
allOf:
- $ref: '#/definitions/CollectingItem'
- required:
- albumName
- artist
properties:
albumName:
type: string
artist:
type: string
VHS:
allOf:
- $ref: '#/definitions/CollectingItem'
- required:
- movieTitle
properties:
movieTitle:
type: string
director:
type: string
AudioCassette:
allOf:
- $ref: '#/definitions/CollectingItem'
- required:
- albumName
- artist
properties:
albumName:
type: string
artist:
type: string
Paging:
required:
- totalItems
- totalPages
- pageSize
- currentPage
properties:
totalItems:
type: integer
totalPages:
type: integer
pageSize:
type: integer
currentPage:
type: integer
PagedPersons:
allOf:
- $ref: '#/definitions/Persons'
- $ref: '#/definitions/Paging'
PagedCollectingItems:
allOf:
- properties:
items:
type: array
minItems: 10
maxItems: 100
uniqueItems: true
items:
$ref: '#/definitions/CollectingItem'
- $ref: '#/definitions/Paging'
responses:
Standard500ErrorResponse:
description: An unexpected error occured.
headers:
X-Rate-Limit-Remaining:
type: integer
X-Rate-Limit-Reset:
type: string
format: date-time
schema:
$ref: '#/definitions/Error'
PersonDoesNotExistResponse:
description: Person does not exist.