Skip to content

Instantly share code, notes, and snippets.

@awsum
Last active March 21, 2019 19:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save awsum/9cff0a151b2c46f3203ad4a8a440249d to your computer and use it in GitHub Desktop.
Save awsum/9cff0a151b2c46f3203ad4a8a440249d to your computer and use it in GitHub Desktop.
openapi: 3.0.0
info:
title: Test API
version: 0.0.1
servers:
- url: 'localhost:3000/api'
description: Local API URL.
paths:
/test:
post:
requestBody:
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/a'
- $ref: '#/components/schemas/b'
responses:
'200':
description: OK
components:
schemas:
a:
type: integer
b:
type: string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment