Skip to content

Instantly share code, notes, and snippets.

@kevchentw
Created November 6, 2021 03:23
Show Gist options
  • Select an option

  • Save kevchentw/9ab2df64c8ce8247a1edc607eed2843f to your computer and use it in GitHub Desktop.

Select an option

Save kevchentw/9ab2df64c8ce8247a1edc607eed2843f to your computer and use it in GitHub Desktop.
openapi: 3.0.1
servers:
- url: 'https://example.com'
info:
description: Test API.
version: 1.0.0
title: example.com API
contact:
url: 'https://example.com'
email: 'test@example.com'
paths:
/loginForm:
post:
operationId: loginForm
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
email:
type: string
password:
type: string
required:
- email
- password
responses:
'200':
description: Login successfull
content:
application/json:
schema:
type: object
required:
- access_token
properties:
access_token:
type: string
/loginJson:
post:
operationId: loginJson
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
email:
type: string
password:
type: string
required:
- email
- password
responses:
'200':
description: Login successfull
content:
application/json:
schema:
type: object
required:
- access_token
properties:
access_token:
type: string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment