feat: add kyc service http handler and docs

This commit is contained in:
2025-09-15 16:52:05 +03:30
parent b2d5659aec
commit c27e3945d5
7 changed files with 254 additions and 0 deletions
+79
View File
@@ -171,6 +171,58 @@ const docTemplate = `{
}
}
},
"/auth/verify-kyc": {
"post": {
"description": "Verify user KYC with national ID and birth date",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Verify user KYC",
"parameters": [
{
"description": "KYC Verify Request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.KYCVerifyRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.KYCVerifyResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/auth/verify-otp": {
"post": {
"description": "Verify the provided OTP code for the phone number",
@@ -279,6 +331,33 @@ const docTemplate = `{
}
}
},
"dto.KYCVerifyRequest": {
"type": "object",
"required": [
"birthDate",
"nationalId",
"userId"
],
"properties": {
"birthDate": {
"type": "string"
},
"nationalId": {
"type": "string"
},
"userId": {
"type": "string"
}
}
},
"dto.KYCVerifyResponse": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
},
"dto.OTPProviderReq": {
"type": "object",
"properties": {
+79
View File
@@ -160,6 +160,58 @@
}
}
},
"/auth/verify-kyc": {
"post": {
"description": "Verify user KYC with national ID and birth date",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Verify user KYC",
"parameters": [
{
"description": "KYC Verify Request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.KYCVerifyRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.KYCVerifyResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/auth/verify-otp": {
"post": {
"description": "Verify the provided OTP code for the phone number",
@@ -268,6 +320,33 @@
}
}
},
"dto.KYCVerifyRequest": {
"type": "object",
"required": [
"birthDate",
"nationalId",
"userId"
],
"properties": {
"birthDate": {
"type": "string"
},
"nationalId": {
"type": "string"
},
"userId": {
"type": "string"
}
}
},
"dto.KYCVerifyResponse": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
},
"dto.OTPProviderReq": {
"type": "object",
"properties": {
+52
View File
@@ -34,6 +34,24 @@ definitions:
timeStamp:
type: string
type: object
dto.KYCVerifyRequest:
properties:
birthDate:
type: string
nationalId:
type: string
userId:
type: string
required:
- birthDate
- nationalId
- userId
type: object
dto.KYCVerifyResponse:
properties:
message:
type: string
type: object
dto.OTPProviderReq:
properties:
receptor:
@@ -164,6 +182,40 @@ paths:
summary: Send OTP code
tags:
- auth
/auth/verify-kyc:
post:
consumes:
- application/json
description: Verify user KYC with national ID and birth date
parameters:
- description: KYC Verify Request
in: body
name: request
required: true
schema:
$ref: '#/definitions/dto.KYCVerifyRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.KYCVerifyResponse'
"400":
description: Bad Request
schema:
additionalProperties:
type: string
type: object
"500":
description: Internal Server Error
schema:
additionalProperties:
type: string
type: object
summary: Verify user KYC
tags:
- auth
/auth/verify-otp:
post:
consumes: