{ "swagger": "2.0", "info": { "description": "A Tag service API in Go using Gin framework", "title": "Tag Service API0", "termsOfService": "https://tos.santoshk.dev", "contact": { "name": "Santosh Kumar", "url": "https://twitter.com/sntshk", "email": "sntshkmr60@gmail.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" }, "version": "1.0" }, "host": "10.10.150.181:8084", "basePath": "/api", "paths": { "/api/local/getalluser": { "get": { "description": "Retrieves all users from the database", "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Get all users", "responses": { "200": { "description": "List of users", "schema": { "type": "array", "items": { "$ref": "#/definitions/user.User" } } }, "500": { "description": "Database connection failed", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/local/getuser/{id}": { "get": { "description": "Retrieves a user by their ID", "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Get user by ID", "parameters": [ { "type": "string", "description": "User ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "User data", "schema": { "$ref": "#/definitions/user.User" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/api/localinsertuser": { "post": { "description": "Adds a new user to the database", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Insert a new user", "parameters": [ { "description": "User Data", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/user.ReqInsertUser" } } ], "responses": { "200": { "description": "Successfully Inserted User", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "500": { "description": "Database connection failed", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/retribusi/deleteretribusi/{ID}": { "delete": { "description": "Remove retribution data by id", "produces": [ "application/json" ], "tags": [ "Retribusi" ], "summary": "Delete retribution", "parameters": [ { "type": "string", "description": "ID", "name": "ID", "in": "path", "required": true } ], "responses": { "200": { "description": "Data Berhasil dihapus", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/retribusi/getData/Limit/{limit}/Offset/{offset}": { "get": { "description": "return list of all retribution from the database", "tags": [ "Retribusi" ], "summary": "all retribution", "parameters": [ { "type": "string", "description": "limit", "name": "limit", "in": "path", "required": true }, { "type": "string", "description": "offset", "name": "offset", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/satu_data.Retribusi" } } } } }, "/retribusi/insertretribusi": { "post": { "description": "Save retribution data in DB", "produces": [ "application/json" ], "tags": [ "Retribusi" ], "summary": "Create retribution", "parameters": [ { "description": "data Retribusi", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/satu_data.Retribusi" } } ], "responses": { "200": { "description": "Data Berhasil disimpan", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/retribusi/searchData/{kelompok_obyek}": { "get": { "description": "search retribution data by id", "produces": [ "application/json" ], "tags": [ "Retribusi" ], "summary": "Search retribution", "parameters": [ { "type": "string", "description": "Kelompok_obyek", "name": "Kelompok_obyek", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/satu_data.Retribusi" } } } } }, "/retribusi/updateretribusi": { "put": { "description": "Change retribution data in DB", "produces": [ "application/json" ], "tags": [ "Retribusi" ], "summary": "Update retribution", "parameters": [ { "description": "data Retribusi", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/satu_data.Retribusi" } } ], "responses": { "200": { "description": "Data Berhasil Diubah", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "/users": { "put": { "description": "Updates user information", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "users" ], "summary": "Update a user", "parameters": [ { "description": "User Data", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/user.User" } } ], "responses": { "200": { "description": "Successfully Updated User", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "500": { "description": "Database connection failed", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } } } } }, "definitions": { "satu_data.Retribusi": { "type": "object", "properties": { "Dinas": { "type": "string" }, "Jenis": { "type": "string" }, "Kelompok_obyek": { "type": "string" }, "Kode_tarif": { "type": "string" }, "Pelayanan": { "type": "string" }, "Rekening_denda": { "type": "string" }, "Rekening_pokok": { "type": "string" }, "Satuan": { "type": "string" }, "Satuan_overtime": { "type": "string" }, "Tarif": { "type": "string" }, "Tarif_overtime": { "type": "string" }, "Uraian_1": { "type": "string" }, "Uraian_2": { "type": "string" }, "Uraian_3": { "type": "string" }, "date_created": { "type": "string" }, "date_updated": { "type": "string" }, "id": { "type": "string" }, "sort": { "type": "integer" }, "status": { "type": "string" }, "user_created": { "type": "string" }, "user_updated": { "type": "string" } } }, "user.ReqInsertUser": { "type": "object", "properties": { "address": { "type": "string" }, "age": { "type": "integer" }, "gender": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "religion": { "type": "string" } } }, "user.User": { "type": "object", "properties": { "address": { "type": "string" }, "age": { "type": "integer" }, "gender": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "religion": { "type": "string" } } } } }