Skip to content

Instantly share code, notes, and snippets.

@adamaltman
Last active March 16, 2022 22:25
Show Gist options
  • Save adamaltman/66a0dacbc3ff769304db3d04456b5a47 to your computer and use it in GitHub Desktop.
Save adamaltman/66a0dacbc3ff769304db3d04456b5a47 to your computer and use it in GitHub Desktop.
WTD talk example
openapi: 3.1.0
info:
description: |
Document the EU API
title: EU Documents
version: '1.0'
servers:
- url: https://redocly.com
tags:
- name: Docs
description: Blah blah blah.
paths:
/documents:
get:
operationId: getDocument
summary: Get document by reference
description: I was told to do this task.
parameters:
- $ref: "#/components/parameters/reference"
- $ref: "#/components/parameters/language"
- $ref: "#/components/parameters/ts"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/Document"
400:
description: Bad Request
components:
parameters:
reference:
name: reference
in: query
required: true
schema:
type: string
example: IP/22/1649
language:
name: language
in: query
required: true
schema:
type: string
example: en
ts:
name: ts
in: query
required: false
schema:
type: string
example: 1647468900529
schemas:
Document:
type: object
examples:
Ukraine:
value: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment