perbaikan

This commit is contained in:
2025-08-26 22:46:21 +07:00
parent 7c16fd17f8
commit e118b20129
5 changed files with 34 additions and 992 deletions

View File

@@ -1,5 +1,4 @@
// Code generated by swaggo/swag. DO NOT EDIT.
// Package docs Code generated by swaggo/swag. DO NOT EDIT
package docs
import "github.com/swaggo/swag"
@@ -663,213 +662,6 @@ const docTemplate = `{
}
}
},
"/api/v1/surkon/spri": {
"put": {
"description": "Update an existing Spri in BPJS system with enhanced validation and logging",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Surkon-Spri"
],
"summary": "Update an existing SPRI",
"parameters": [
{
"description": "Spri update request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/models.SpriPutRequest"
}
}
],
"responses": {
"200": {
"description": "Spri updated successfully",
"schema": {
"$ref": "#/definitions/models.SpriResponse"
}
},
"400": {
"description": "Bad request - validation error",
"schema": {
"$ref": "#/definitions/models.SpriResponse"
}
},
"422": {
"description": "Unprocessable entity - business logic error",
"schema": {
"$ref": "#/definitions/models.SpriResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/models.SpriResponse"
}
}
}
},
"post": {
"description": "Create a new Spri in BPJS system with enhanced validation and logging",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Surkon-Spri"
],
"summary": "Create a new SPRI",
"parameters": [
{
"description": "Spri creation request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/models.SpriPostRequest"
}
}
],
"responses": {
"200": {
"description": "Spri created successfully",
"schema": {
"$ref": "#/definitions/models.SpriResponse"
}
},
"400": {
"description": "Bad request - validation error",
"schema": {
"$ref": "#/definitions/models.SpriResponse"
}
},
"422": {
"description": "Unprocessable entity - business logic error",
"schema": {
"$ref": "#/definitions/models.SpriResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/models.SpriResponse"
}
}
}
}
},
"/api/v1/surkon/spri/{id}": {
"get": {
"description": "Retrieve a Spri by ID with enhanced validation and logging",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Surkon-Spri"
],
"summary": "Get an existing SPRI",
"parameters": [
{
"type": "string",
"description": "Spri ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Data Spri retrieved successfully",
"schema": {
"$ref": "#/definitions/models.SpriResponse"
}
},
"400": {
"description": "Bad request - invalid ID",
"schema": {
"$ref": "#/definitions/models.SpriResponse"
}
},
"404": {
"description": "Spri not found",
"schema": {
"$ref": "#/definitions/models.SpriResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/models.SpriResponse"
}
}
}
},
"delete": {
"description": "Delete a Spri by ID with enhanced validation and logging",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Surkon-Spri"
],
"summary": "Delete an existing SPRI",
"parameters": [
{
"type": "string",
"description": "Spri ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "User identifier",
"name": "user",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "Spri deleted successfully",
"schema": {
"$ref": "#/definitions/models.SpriResponse"
}
},
"400": {
"description": "Bad request - missing parameters",
"schema": {
"$ref": "#/definitions/models.SpriResponse"
}
},
"422": {
"description": "Unprocessable entity - business logic error",
"schema": {
"$ref": "#/definitions/models.SpriResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/models.SpriResponse"
}
}
}
}
},
"/api/v1/token/generate": {
"post": {
"description": "Generate a JWT token for a user",
@@ -1600,161 +1392,6 @@ const docTemplate = `{
"type": "object",
"additionalProperties": {}
},
"internal_models_surkon.ErrorResponse": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"details": {
"type": "string"
},
"message": {
"type": "string"
}
}
},
"models.ResponseMetadata": {
"type": "object",
"properties": {
"request_id": {
"type": "string"
},
"timestamp": {
"type": "string"
},
"version": {
"type": "string"
}
}
},
"models.SpriPost": {
"type": "object",
"required": [
"jnsPelayanan",
"noKartu",
"ppkPelayanan",
"tglLayanan",
"user"
],
"properties": {
"catatan": {
"type": "string",
"maxLength": 200
},
"jnsPelayanan": {
"type": "string",
"enum": [
"1",
"2"
]
},
"noKartu": {
"description": "Core BPJS fields - customize based on your specific requirements",
"type": "string",
"maxLength": 13,
"minLength": 13
},
"ppkPelayanan": {
"type": "string"
},
"tglLayanan": {
"type": "string"
},
"user": {
"type": "string"
}
}
},
"models.SpriPostRequest": {
"type": "object",
"required": [
"tsep"
],
"properties": {
"request_id": {
"type": "string"
},
"timestamp": {
"type": "string"
},
"tsep": {
"$ref": "#/definitions/models.SpriPost"
}
}
},
"models.SpriPut": {
"type": "object",
"required": [
"id",
"user"
],
"properties": {
"catatan": {
"type": "string",
"maxLength": 200
},
"id": {
"type": "string"
},
"jnsPelayanan": {
"type": "string",
"enum": [
"1",
"2"
]
},
"noKartu": {
"type": "string",
"maxLength": 13,
"minLength": 13
},
"ppkPelayanan": {
"type": "string"
},
"tglLayanan": {
"type": "string"
},
"user": {
"type": "string"
}
}
},
"models.SpriPutRequest": {
"type": "object",
"required": [
"tsep"
],
"properties": {
"request_id": {
"type": "string"
},
"timestamp": {
"type": "string"
},
"tsep": {
"$ref": "#/definitions/models.SpriPut"
}
}
},
"models.SpriResponse": {
"type": "object",
"properties": {
"data": {},
"error": {
"$ref": "#/definitions/internal_models_surkon.ErrorResponse"
},
"message": {
"type": "string"
},
"metadata": {
"$ref": "#/definitions/models.ResponseMetadata"
},
"status": {
"type": "string"
}
}
},
"sql.NullString": {
"type": "object",
"properties": {
@@ -1792,6 +1429,8 @@ var SwaggerInfo = &swag.Spec{
Description: "A comprehensive Go API service with Swagger documentation",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
LeftDelim: "{{",
RightDelim: "}}",
}
func init() {

View File

@@ -660,213 +660,6 @@
}
}
},
"/api/v1/surkon/spri": {
"put": {
"description": "Update an existing Spri in BPJS system with enhanced validation and logging",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Surkon-Spri"
],
"summary": "Update an existing SPRI",
"parameters": [
{
"description": "Spri update request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/models.SpriPutRequest"
}
}
],
"responses": {
"200": {
"description": "Spri updated successfully",
"schema": {
"$ref": "#/definitions/models.SpriResponse"
}
},
"400": {
"description": "Bad request - validation error",
"schema": {
"$ref": "#/definitions/models.SpriResponse"
}
},
"422": {
"description": "Unprocessable entity - business logic error",
"schema": {
"$ref": "#/definitions/models.SpriResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/models.SpriResponse"
}
}
}
},
"post": {
"description": "Create a new Spri in BPJS system with enhanced validation and logging",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Surkon-Spri"
],
"summary": "Create a new SPRI",
"parameters": [
{
"description": "Spri creation request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/models.SpriPostRequest"
}
}
],
"responses": {
"200": {
"description": "Spri created successfully",
"schema": {
"$ref": "#/definitions/models.SpriResponse"
}
},
"400": {
"description": "Bad request - validation error",
"schema": {
"$ref": "#/definitions/models.SpriResponse"
}
},
"422": {
"description": "Unprocessable entity - business logic error",
"schema": {
"$ref": "#/definitions/models.SpriResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/models.SpriResponse"
}
}
}
}
},
"/api/v1/surkon/spri/{id}": {
"get": {
"description": "Retrieve a Spri by ID with enhanced validation and logging",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Surkon-Spri"
],
"summary": "Get an existing SPRI",
"parameters": [
{
"type": "string",
"description": "Spri ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Data Spri retrieved successfully",
"schema": {
"$ref": "#/definitions/models.SpriResponse"
}
},
"400": {
"description": "Bad request - invalid ID",
"schema": {
"$ref": "#/definitions/models.SpriResponse"
}
},
"404": {
"description": "Spri not found",
"schema": {
"$ref": "#/definitions/models.SpriResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/models.SpriResponse"
}
}
}
},
"delete": {
"description": "Delete a Spri by ID with enhanced validation and logging",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Surkon-Spri"
],
"summary": "Delete an existing SPRI",
"parameters": [
{
"type": "string",
"description": "Spri ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "User identifier",
"name": "user",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "Spri deleted successfully",
"schema": {
"$ref": "#/definitions/models.SpriResponse"
}
},
"400": {
"description": "Bad request - missing parameters",
"schema": {
"$ref": "#/definitions/models.SpriResponse"
}
},
"422": {
"description": "Unprocessable entity - business logic error",
"schema": {
"$ref": "#/definitions/models.SpriResponse"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/models.SpriResponse"
}
}
}
}
},
"/api/v1/token/generate": {
"post": {
"description": "Generate a JWT token for a user",
@@ -1597,161 +1390,6 @@
"type": "object",
"additionalProperties": {}
},
"internal_models_surkon.ErrorResponse": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"details": {
"type": "string"
},
"message": {
"type": "string"
}
}
},
"models.ResponseMetadata": {
"type": "object",
"properties": {
"request_id": {
"type": "string"
},
"timestamp": {
"type": "string"
},
"version": {
"type": "string"
}
}
},
"models.SpriPost": {
"type": "object",
"required": [
"jnsPelayanan",
"noKartu",
"ppkPelayanan",
"tglLayanan",
"user"
],
"properties": {
"catatan": {
"type": "string",
"maxLength": 200
},
"jnsPelayanan": {
"type": "string",
"enum": [
"1",
"2"
]
},
"noKartu": {
"description": "Core BPJS fields - customize based on your specific requirements",
"type": "string",
"maxLength": 13,
"minLength": 13
},
"ppkPelayanan": {
"type": "string"
},
"tglLayanan": {
"type": "string"
},
"user": {
"type": "string"
}
}
},
"models.SpriPostRequest": {
"type": "object",
"required": [
"tsep"
],
"properties": {
"request_id": {
"type": "string"
},
"timestamp": {
"type": "string"
},
"tsep": {
"$ref": "#/definitions/models.SpriPost"
}
}
},
"models.SpriPut": {
"type": "object",
"required": [
"id",
"user"
],
"properties": {
"catatan": {
"type": "string",
"maxLength": 200
},
"id": {
"type": "string"
},
"jnsPelayanan": {
"type": "string",
"enum": [
"1",
"2"
]
},
"noKartu": {
"type": "string",
"maxLength": 13,
"minLength": 13
},
"ppkPelayanan": {
"type": "string"
},
"tglLayanan": {
"type": "string"
},
"user": {
"type": "string"
}
}
},
"models.SpriPutRequest": {
"type": "object",
"required": [
"tsep"
],
"properties": {
"request_id": {
"type": "string"
},
"timestamp": {
"type": "string"
},
"tsep": {
"$ref": "#/definitions/models.SpriPut"
}
}
},
"models.SpriResponse": {
"type": "object",
"properties": {
"data": {},
"error": {
"$ref": "#/definitions/internal_models_surkon.ErrorResponse"
},
"message": {
"type": "string"
},
"metadata": {
"$ref": "#/definitions/models.ResponseMetadata"
},
"status": {
"type": "string"
}
}
},
"sql.NullString": {
"type": "object",
"properties": {

View File

@@ -307,112 +307,6 @@ definitions:
gin.H:
additionalProperties: {}
type: object
internal_models_surkon.ErrorResponse:
properties:
code:
type: string
details:
type: string
message:
type: string
type: object
models.ResponseMetadata:
properties:
request_id:
type: string
timestamp:
type: string
version:
type: string
type: object
models.SpriPost:
properties:
catatan:
maxLength: 200
type: string
jnsPelayanan:
enum:
- "1"
- "2"
type: string
noKartu:
description: Core BPJS fields - customize based on your specific requirements
maxLength: 13
minLength: 13
type: string
ppkPelayanan:
type: string
tglLayanan:
type: string
user:
type: string
required:
- jnsPelayanan
- noKartu
- ppkPelayanan
- tglLayanan
- user
type: object
models.SpriPostRequest:
properties:
request_id:
type: string
timestamp:
type: string
tsep:
$ref: '#/definitions/models.SpriPost'
required:
- tsep
type: object
models.SpriPut:
properties:
catatan:
maxLength: 200
type: string
id:
type: string
jnsPelayanan:
enum:
- "1"
- "2"
type: string
noKartu:
maxLength: 13
minLength: 13
type: string
ppkPelayanan:
type: string
tglLayanan:
type: string
user:
type: string
required:
- id
- user
type: object
models.SpriPutRequest:
properties:
request_id:
type: string
timestamp:
type: string
tsep:
$ref: '#/definitions/models.SpriPut'
required:
- tsep
type: object
models.SpriResponse:
properties:
data: {}
error:
$ref: '#/definitions/internal_models_surkon.ErrorResponse'
message:
type: string
metadata:
$ref: '#/definitions/models.ResponseMetadata'
status:
type: string
type: object
sql.NullString:
properties:
string:
@@ -865,144 +759,6 @@ paths:
summary: Get retribusi statistics
tags:
- retribusi
/api/v1/surkon/spri:
post:
consumes:
- application/json
description: Create a new Spri in BPJS system with enhanced validation and logging
parameters:
- description: Spri creation request
in: body
name: request
required: true
schema:
$ref: '#/definitions/models.SpriPostRequest'
produces:
- application/json
responses:
"200":
description: Spri created successfully
schema:
$ref: '#/definitions/models.SpriResponse'
"400":
description: Bad request - validation error
schema:
$ref: '#/definitions/models.SpriResponse'
"422":
description: Unprocessable entity - business logic error
schema:
$ref: '#/definitions/models.SpriResponse'
"500":
description: Internal server error
schema:
$ref: '#/definitions/models.SpriResponse'
summary: Create a new SPRI
tags:
- Surkon-Spri
put:
consumes:
- application/json
description: Update an existing Spri in BPJS system with enhanced validation
and logging
parameters:
- description: Spri update request
in: body
name: request
required: true
schema:
$ref: '#/definitions/models.SpriPutRequest'
produces:
- application/json
responses:
"200":
description: Spri updated successfully
schema:
$ref: '#/definitions/models.SpriResponse'
"400":
description: Bad request - validation error
schema:
$ref: '#/definitions/models.SpriResponse'
"422":
description: Unprocessable entity - business logic error
schema:
$ref: '#/definitions/models.SpriResponse'
"500":
description: Internal server error
schema:
$ref: '#/definitions/models.SpriResponse'
summary: Update an existing SPRI
tags:
- Surkon-Spri
/api/v1/surkon/spri/{id}:
delete:
consumes:
- application/json
description: Delete a Spri by ID with enhanced validation and logging
parameters:
- description: Spri ID
in: path
name: id
required: true
type: string
- description: User identifier
in: query
name: user
required: true
type: string
produces:
- application/json
responses:
"200":
description: Spri deleted successfully
schema:
$ref: '#/definitions/models.SpriResponse'
"400":
description: Bad request - missing parameters
schema:
$ref: '#/definitions/models.SpriResponse'
"422":
description: Unprocessable entity - business logic error
schema:
$ref: '#/definitions/models.SpriResponse'
"500":
description: Internal server error
schema:
$ref: '#/definitions/models.SpriResponse'
summary: Delete an existing SPRI
tags:
- Surkon-Spri
get:
consumes:
- application/json
description: Retrieve a Spri by ID with enhanced validation and logging
parameters:
- description: Spri ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: Data Spri retrieved successfully
schema:
$ref: '#/definitions/models.SpriResponse'
"400":
description: Bad request - invalid ID
schema:
$ref: '#/definitions/models.SpriResponse'
"404":
description: Spri not found
schema:
$ref: '#/definitions/models.SpriResponse'
"500":
description: Internal server error
schema:
$ref: '#/definitions/models.SpriResponse'
summary: Get an existing SPRI
tags:
- Surkon-Spri
/api/v1/token/generate:
post:
consumes: