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() {