Skip to content

Instantly share code, notes, and snippets.

@bravo-kernel
Created August 2, 2019 09:49
Show Gist options
  • Select an option

  • Save bravo-kernel/d4e6813b13ba0c2871f2619120b07a4d to your computer and use it in GitHub Desktop.

Select an option

Save bravo-kernel/d4e6813b13ba0c2871f2619120b07a4d to your computer and use it in GitHub Desktop.
OpenAPI v3 document
info:
title: P2 API
description: A description
version: 0.0.1
paths:
/folders:
get:
parameters:
- description: Number of results to return
in: query
name: $limit
schema:
type: integer
- description: Number of results to skip
in: query
name: $skip
schema:
type: integer
- description: Property to sort results
in: query
name: $sort
style: deepObject
schema:
type: object
- description: Query parameters to filter
in: query
name: filter
style: form
explode: true
schema:
$ref: '#/components/schemas/folders'
responses:
'200':
description: success
content:
application/json:
schema:
$ref: '#/components/schemas/folders_list'
'401':
description: not authenticated
'500':
description: general error
description: Retrieves a list of all resources from the service.
summary: ''
tags:
- folders
security: []
post:
parameters: []
responses:
'201':
description: created
content:
application/json:
schema:
$ref: '#/components/schemas/folders'
'401':
description: not authenticated
'500':
description: general error
description: Creates a new resource with data.
summary: ''
tags:
- folders
security: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/folders'
'/folders/{id}':
get:
parameters:
- description: ID of folders to return
in: path
required: true
name: id
schema:
type: integer
responses:
'200':
description: success
content:
application/json:
schema:
$ref: '#/components/schemas/folders'
'401':
description: not authenticated
'404':
description: not found
'500':
description: general error
description: Retrieves a single resource with the given id from the service.
summary: ''
tags:
- folders
security: []
put:
parameters:
- description: ID of folders to update
in: path
required: true
name: id
schema:
type: integer
responses:
'200':
description: success
content:
application/json:
schema:
$ref: '#/components/schemas/folders'
'401':
description: not authenticated
'404':
description: not found
'500':
description: general error
description: Updates the resource identified by id using data.
summary: ''
tags:
- folders
security: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/folders'
patch:
parameters:
- description: ID of folders to update
in: path
required: true
name: id
schema:
type: integer
responses:
'200':
description: success
content:
application/json:
schema:
$ref: '#/components/schemas/folders'
'401':
description: not authenticated
'404':
description: not found
'500':
description: general error
description: Updates the resource identified by id using data.
summary: ''
tags:
- folders
security: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/folders'
delete:
parameters:
- description: ID of folders to remove
in: path
required: true
name: id
schema:
type: integer
responses:
'200':
description: success
content:
application/json:
schema:
$ref: '#/components/schemas/folders'
'401':
description: not authenticated
'404':
description: not found
'500':
description: general error
description: Removes the resource with id.
summary: ''
tags:
- folders
security: []
/projects:
get:
parameters:
- description: Number of results to return
in: query
name: $limit
schema:
type: integer
- description: Number of results to skip
in: query
name: $skip
schema:
type: integer
- description: Property to sort results
in: query
name: $sort
style: deepObject
schema:
type: object
- description: Query parameters to filter
in: query
name: filter
style: form
explode: true
schema:
$ref: '#/components/schemas/projects'
responses:
'200':
description: success
content:
application/json:
schema:
$ref: '#/components/schemas/projects_list'
'401':
description: not authenticated
'500':
description: general error
description: Retrieves a list of all resources from the service.
summary: ''
tags:
- projects
security: []
post:
parameters: []
responses:
'201':
description: created
content:
application/json:
schema:
$ref: '#/components/schemas/projects'
'401':
description: not authenticated
'500':
description: general error
description: Creates a new resource with data.
summary: ''
tags:
- projects
security: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/projects'
'/projects/{id}':
get:
parameters:
- description: ID of Projects to return
in: path
required: true
name: id
schema:
type: integer
responses:
'200':
description: success
content:
application/json:
schema:
$ref: '#/components/schemas/projects'
'401':
description: not authenticated
'404':
description: not found
'500':
description: general error
description: Retrieves a single resource with the given id from the service.
summary: ''
tags:
- projects
security: []
put:
parameters:
- description: ID of Projects to update
in: path
required: true
name: id
schema:
type: integer
responses:
'200':
description: success
content:
application/json:
schema:
$ref: '#/components/schemas/projects'
'401':
description: not authenticated
'404':
description: not found
'500':
description: general error
description: Updates the resource identified by id using data.
summary: ''
tags:
- projects
security: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/projects'
patch:
parameters:
- description: ID of Projects to update
in: path
required: true
name: id
schema:
type: integer
responses:
'200':
description: success
content:
application/json:
schema:
$ref: '#/components/schemas/projects'
'401':
description: not authenticated
'404':
description: not found
'500':
description: general error
description: Updates the resource identified by id using data.
summary: ''
tags:
- projects
security: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/projects'
delete:
parameters:
- description: ID of Projects to remove
in: path
required: true
name: id
schema:
type: integer
responses:
'200':
description: success
content:
application/json:
schema:
$ref: '#/components/schemas/projects'
'401':
description: not authenticated
'404':
description: not found
'500':
description: general error
description: Removes the resource with id.
summary: ''
tags:
- projects
security: []
/users:
get:
parameters:
- description: Number of results to return
in: query
name: $limit
schema:
type: integer
- description: Number of results to skip
in: query
name: $skip
schema:
type: integer
- description: Property to sort results
in: query
name: $sort
style: deepObject
schema:
type: object
- description: Query parameters to filter
in: query
name: filter
style: form
explode: true
schema:
$ref: '#/components/schemas/users'
responses:
'200':
description: success
content:
application/json:
schema:
$ref: '#/components/schemas/users_list'
'401':
description: not authenticated
'500':
description: general error
description: Retrieves a list of all resources from the service.
summary: ''
tags:
- users
security: []
post:
parameters: []
responses:
'201':
description: created
content:
application/json:
schema:
$ref: '#/components/schemas/users'
'401':
description: not authenticated
'500':
description: general error
description: Creates a new resource with data.
summary: ''
tags:
- users
security: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/users'
'/users/{id}':
get:
parameters:
- description: ID of users to return
in: path
required: true
name: id
schema:
type: integer
responses:
'200':
description: success
content:
application/json:
schema:
$ref: '#/components/schemas/users'
'401':
description: not authenticated
'404':
description: not found
'500':
description: general error
description: Retrieves a single resource with the given id from the service.
summary: ''
tags:
- users
security: []
put:
parameters:
- description: ID of users to update
in: path
required: true
name: id
schema:
type: integer
responses:
'200':
description: success
content:
application/json:
schema:
$ref: '#/components/schemas/users'
'401':
description: not authenticated
'404':
description: not found
'500':
description: general error
description: Updates the resource identified by id using data.
summary: ''
tags:
- users
security: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/users'
patch:
parameters:
- description: ID of users to update
in: path
required: true
name: id
schema:
type: integer
responses:
'200':
description: success
content:
application/json:
schema:
$ref: '#/components/schemas/users'
'401':
description: not authenticated
'404':
description: not found
'500':
description: general error
description: Updates the resource identified by id using data.
summary: ''
tags:
- users
security: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/users'
delete:
parameters:
- description: ID of users to remove
in: path
required: true
name: id
schema:
type: integer
responses:
'200':
description: success
content:
application/json:
schema:
$ref: '#/components/schemas/users'
'401':
description: not authenticated
'404':
description: not found
'500':
description: general error
description: Removes the resource with id.
summary: ''
tags:
- users
security: []
components:
schemas:
folders:
title: Folder
$id: /folders.json
type: object
$schema: 'http://json-schema.org/draft-06/schema#'
properties:
created_at:
type: string
$id: /properties/created_at
examples: []
title: Created at
createdAt:
type: string
$id: /properties/createdAt
examples: []
title: Created at
hierarchyLevel:
type: integer
$id: /properties/hierarchyLevel
examples: []
title: Hierarchy level
id:
$id: /properties/id
examples: []
title: Id
name:
type: string
$id: /properties/name
examples:
- entry1
- entry2
title: This title was added from within the sequelize model
description: This description was added from within the sequelize model
maxLength: 20
parentId:
$id: /properties/parentId
examples: []
title: Parent id
sortIndex:
type: integer
$id: /properties/sortIndex
examples: []
title: Sort index
updated_at:
type: string
$id: /properties/updated_at
examples: []
title: Updated at
updatedAt:
type: string
$id: /properties/updatedAt
examples: []
title: Updated at
userId:
$id: /properties/userId
examples: []
title: User id
virtualField:
type: string
title: Virtual field
description: This description for a virtual field was added from within the sequelize model
$id: /properties/virtualField
examples: []
folders_list:
title: folders list
type: array
items:
$ref: '#/components/schemas/folders'
projects:
title: Project
$id: /projects.json
type: object
$schema: 'http://json-schema.org/draft-06/schema#'
properties:
companyName:
type: string
$id: /properties/companyName
examples:
- NoobCorp
title: Company Name
description: Company Name Legal
createdAt:
type: string
$id: /properties/createdAt
examples: []
title: Created at
description:
type: string
$id: /properties/description
examples: []
title: Description
id:
$id: /properties/id
examples: []
title: Id
name:
type: string
$id: /properties/name
examples: []
title: Name
slug:
type: string
$id: /properties/slug
examples: []
title: Slug
updatedAt:
type: string
$id: /properties/updatedAt
examples: []
title: Updated at
virtualField2:
type: string
title: Virtual field 2
description: This description for virtual field 2 was added from within the sequelize model
$id: /properties/virtualField2
examples: []
projects_list:
title: Projects list
type: array
items:
$ref: '#/components/schemas/projects'
users:
title: User
$id: /users.json
type: object
$schema: 'http://json-schema.org/draft-06/schema#'
properties:
createdAt:
type: string
$id: /properties/createdAt
examples: []
title: Created at
email:
type: string
$id: /properties/email
examples:
- some.name@example.com
title: Email
id:
$id: /properties/id
examples: []
title: Id
password:
type: string
$id: /properties/password
examples: []
title: Password
rootFolder:
$id: /properties/rootFolder
examples: []
title: Root folder
updatedAt:
type: string
$id: /properties/updatedAt
examples: []
title: Updated at
users_list:
title: users list
type: array
items:
$ref: '#/components/schemas/users'
openapi: 3.0.2
tags:
- name: folders
description: A folders service
- name: projects
description: A projects service
- name: users
description: A users service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment