Files
connected-home/crates/api-gateway/doc/swagger.yaml
Steve Sampson a5ad4341cf
All checks were successful
continuous-integration/drone/push Build is passing
Add Behave BDD Tests and Swagger Docs
* Added Behave BDD Tests for User Service
* Added Swagger Docs for User Service
* Added Vault, Redpanda helm config (not yet being used)
* Added frontend config for host / port when running locally
2022-05-19 09:24:31 -03:00

87 lines
2.2 KiB
YAML

openapi: 3.0.0
info:
title: Connected Home API
description: This Swagger Doc provides usage information on the Connected Home public API.
version: 0.1.0
servers:
- url: http://localhost:8082/api
description: Local (development) server
components:
securitySchemes:
BearerAuth:
type: http
scheme: bearer
paths:
/register:
post:
summary: Registers a new user and returns a JWT.
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
password:
type: string
responses:
'201': # status code
description: A JSON Web Token
content:
application/json:
schema:
type: object
properties:
token:
type: string
/login:
post:
summary: Authenticates a user and returns a JWT.
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
password:
type: string
responses:
'200': # status code
description: A JSON Web Token
content:
application/json:
schema:
type: object
properties:
token:
type: string
/profile:
get:
summary: Returns a user profile
security:
- BearerAuth: []
responses:
'200': # status code
description: A JSON array of user names
content:
application/json:
schema:
type: object
properties:
first_name:
type: string
last_name:
type: string
street_number:
type: number
street:
type: string
city:
type: string
postal_code:
type: string