Skip to content

Instantly share code, notes, and snippets.

@michalkozminski
Created November 7, 2022 11:31
Show Gist options
  • Save michalkozminski/8abead80d3db9aedb78ba98765b3214c to your computer and use it in GitHub Desktop.
Save michalkozminski/8abead80d3db9aedb78ba98765b3214c to your computer and use it in GitHub Desktop.
openapi: 3.0.0
info:
title: Employees first iteration
version: 0.0.1
paths:
/employees:
get :
summary: List all employees
responses:
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