Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save josehenriqueventura/fabb103490d279d68f73beae9e5f721f to your computer and use it in GitHub Desktop.
Save josehenriqueventura/fabb103490d279d68f73beae9e5f721f to your computer and use it in GitHub Desktop.
openapi.yaml
---
openapi: 3.0.0
info:
title: Generated API
version: "1.0"
paths:
/fruits:
get:
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/SetFruit'
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Fruit'
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/SetFruit'
delete:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Fruit'
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/SetFruit'
components:
schemas:
MapStringString:
type: object
additionalProperties:
type: string
Fruit:
type: object
properties:
cites:
$ref: '#/components/schemas/MapStringString'
description:
type: string
name:
type: string
SetFruit:
$ref: '#/components/schemas/SetFruit'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment