Files
api_tmpl/docs/swagger.yaml
T
FernandoJVideira c4ee0ce4dc chore: rename simple_bank to api_tmpl and clean up for template use
Rename the module, proto service, and all identifiers from simple_bank/
SimpleBank to api_tmpl/ApiTmpl, and regenerate the gRPC/gateway/swagger/
mock code accordingly.

- Scrub real secrets (SMTP password, auth token secret) from api.env/
  api_test.env, untrack them, and add api.env.example/api_test.env.example
- Remove committed build artifacts (tmp/main, tmp/build-errors.log,
  dbml-error.log) and gitignore them going forward
- Fix Dockerfile paths (build target, migrations copy) that referenced a
  stale project layout
- Rewrite README to match the actual cmd/ + internal/ structure and add a
  "using this as a template" section
2026-08-25 03:02:37 +01: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 API Template application
license:
name: MIT
url: https://opensource.org/licenses/MIT
termsOfService: http://swagger.io/terms/
title: API Template
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"