-
-
Save michalkozminski/dd9dc8d9503590b35edb323537b06485 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.0 | |
info: | |
title: Employees first iteration | |
version: 0.0.1 | |
paths: | |
/employees: | |
get: | |
summary: List all employees | |
parameters: | |
- in: query | |
name: limit | |
schema: | |
type: integer | |
example: 10 | |
default: 10 | |
minimum: 0 | |
maximum: 20 | |
responses: | |
401: | |
description: No token or wrong one | |
content: | |
application/vnd.company.people.v1+json: | |
schema: | |
type: object | |
properties: | |
error: | |
type: string | |
example: "Not authorized" | |
decription: | |
type: string | |
example: "Wrong token priveded in Auth " | |
403: | |
description: Not authorized | |
200: | |
description: Return list of employees | |
content: | |
application/vnd.company.v1+json: | |
schema: | |
type: object | |
properties: | |
pagination: | |
type: object | |
properties: | |
next_page: | |
type: string | |
example: "/employees?cursor=example string 123" | |
previous_page: | |
type: string | |
example: "/employees?cursor=example_string_312" | |
data: | |
type: array | |
items: | |
$ref: '#components/schemas/employee' | |
components: | |
schemas: | |
employee: | |
type: object | |
properties: | |
id: | |
type: number | |
example: 12345 | |
description: Id of the employee | |
email: | |
type: string | |
example: jack. sparrow@comapny.com | |
full_name: | |
type: string | |
example: Jack Sparrow | |
department: | |
type: string | |
example: Jack Sparrow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment