Skip to content

Instantly share code, notes, and snippets.

@michalkozminski
Created November 7, 2022 11:21
Show Gist options
  • Save michalkozminski/a0a900d2d9a0ccc94caba36077d662e5 to your computer and use it in GitHub Desktop.
Save michalkozminski/a0a900d2d9a0ccc94caba36077d662e5 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: 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 Sparrowv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment