Skip to content

Instantly share code, notes, and snippets.

@mathis-m
Created November 30, 2021 14:00
Show Gist options
  • Save mathis-m/8aab944b66ce47b19a4c31b7672c92aa to your computer and use it in GitHub Desktop.
Save mathis-m/8aab944b66ce47b19a4c31b7672c92aa to your computer and use it in GitHub Desktop.
---
openapi: 3.0.3
info:
title: Yodel API
version: 0.0.1
paths:
/hello:
get:
tags:
- Example Resource
responses:
"200":
description: OK
content:
text/plain:
schema:
type: string
/hello/unsecured:
get:
tags:
- Example Resource
responses:
"200":
description: OK
content:
application/json:
schema:
type: string
/users:
get:
tags:
- User Resource
responses:
"200":
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/UserResponseDto'
security:
- Google: []
- Local: []
/users/register/google:
post:
tags:
- User Resource
responses:
"200":
description: OK
content:
application/json:
schema:
type: string
security:
- Google: []
- Local: []
/users/register/local:
post:
tags:
- User Resource
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateUserDto'
responses:
"200":
description: OK
content:
text/plain:
schema:
type: string
components:
schemas:
CreateUserDto:
type: object
properties:
username:
type: string
password:
type: string
UserResponseDto:
type: object
properties:
id:
format: int64
type: integer
userName:
type: string
securitySchemes:
Local:
type: http
scheme: basic
Google:
type: openIdConnect
description: Authentication
openIdConnectUrl: https://accounts.google.com/.well-known/openid-configuration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment