Skip to content

Instantly share code, notes, and snippets.

@jwigankow
Last active May 3, 2022 15:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jwigankow/3ae7c9cabf3674de76c472dd94495a80 to your computer and use it in GitHub Desktop.
Save jwigankow/3ae7c9cabf3674de76c472dd94495a80 to your computer and use it in GitHub Desktop.
openapi: 3.0.0
info:
title: Example API
version: 1.0.0
servers:
- url: 'https://example.com/'
paths:
/example:
get:
tags:
- example
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- a
- b
- c
properties:
a:
type: string
format: uuid
b:
type: string
format: date-time
c:
type: string
format: date-time
nullable: true
examples:
example-1:
value:
a: f66b1dab-ad34-4a80-b95d-8adeaed5698b
b: 2021-01-02T14:00:03.753Z
c: null
summary: with `null` values
example-2:
value:
a: f66b1dab-ad34-4a80-b95d-8adeaed5698b
b: 2021-01-02T14:00:03.753Z
c: 2021-01-02T14:00:03.753Z
summary: without `null` values
components:
securitySchemes:
BearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
security:
- BearerAuth: []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment