Files
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

152 lines
4.5 KiB
JSON

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