Files
2026-01-08 01:15:07 +00:00

101 lines
2.1 KiB
YAML

basePath: /v1
definitions:
api.createUserRequest:
properties:
email:
type: string
full_name:
type: string
password:
minLength: 6
type: string
username:
type: string
required:
- email
- full_name
- password
- username
type: object
api.userResponse:
properties:
created_at:
type: string
email:
type: string
full_name:
type: string
password_changed_at:
type: string
username:
type: string
type: object
util.JSONResponse:
properties:
data: {}
error:
type: string
message:
type: string
success:
type: boolean
type: object
host: localhost:8080
info:
contact:
email: [email protected]
name: API Support
description: API for Simple Bank application
license:
name: MIT
url: https://opensource.org/licenses/MIT
termsOfService: http://swagger.io/terms/
title: Simple Bank API
version: "1.0"
paths:
/v1/auth/register:
post:
consumes:
- application/json
description: Register a new user account
parameters:
- description: User registration details
in: body
name: request
required: true
schema:
$ref: '#/definitions/api.createUserRequest'
produces:
- application/json
responses:
"201":
description: Created
schema:
allOf:
- $ref: '#/definitions/util.JSONResponse'
- properties:
data:
$ref: '#/definitions/api.userResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/util.JSONResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/util.JSONResponse'
summary: Create a new user
tags:
- auth
schemes:
- http
- https
securityDefinitions:
BearerAuth:
description: Type "Bearer" followed by a space and JWT token.
in: header
name: Authorization
type: apiKey
swagger: "2.0"