Files
pos-system/microservices/docs/vi/api/openapi/iam-service.yaml
Ho Ngoc Hai 76d75c753b Migrate
2026-05-23 18:37:02 +07:00

103 lines
2.2 KiB
YAML

openapi: 3.0.0
info:
title: IAM Service API
version: 1.0.0
description: Identity and Access Management Service API
servers:
- url: http://localhost/api/v1
description: Local development
- url: https://api.goodgo.vn/api/v1
description: Production
paths:
/auth/register:
post:
summary: Register new user
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
email:
type: string
format: email
password:
type: string
minLength: 6
confirmPassword:
type: string
responses:
'201':
description: User registered successfully
'400':
description: Validation error
/auth/login:
post:
summary: Login user
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
email:
type: string
format: email
password:
type: string
responses:
'200':
description: Login successful
'401':
description: Invalid credentials
/auth/logout:
post:
summary: Logout user
security:
- bearerAuth: []
responses:
'200':
description: Logout successful
/auth/refresh:
post:
summary: Refresh access token
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
refreshToken:
type: string
responses:
'200':
description: Token refreshed
'401':
description: Invalid refresh token
/users/me:
get:
summary: Get current user
security:
- bearerAuth: []
responses:
'200':
description: User information
'401':
description: Unauthorized
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT