{ "swagger": "2.0", "info": { "description": "This is a Nusantara Oleh Oleh Apps", "title": "API DOCS NUSANTARA OLEH OLEH", "contact": { "name": "API Support", "url": "http://www.swagger.io/support", "email": "support@swagger.io" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/license/LICENSE-2.0.html" }, "version": "1.0" }, "host": "https://nusantaraservice-production.up.railway.app", "basePath": "/api/v1", "paths": { "/admin/register": { "post": { "description": "Mendaftarkan SuperAdmin baru ke sistem.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "SuperAdmin" ], "summary": "API Register SuperAdmin", "parameters": [ { "description": "Data Registrasi Admin", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.RegisterAdminRequest" } } ], "responses": { "201": { "description": "Admin Registered", "schema": { "allOf": [ { "$ref": "#/definitions/response.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/entities.UserEntity" } } } ] } }, "400": { "description": "Request tidak valid (contoh: field kosong)", "schema": { "$ref": "#/definitions/response.Response" } }, "500": { "description": "Kesalahan internal server", "schema": { "$ref": "#/definitions/response.Response" } } } } } }, "definitions": { "dto.RegisterAdminRequest": { "type": "object", "properties": { "email": { "type": "string" }, "name": { "type": "string" }, "password": { "type": "string" }, "role_id": { "type": "string" }, "username": { "type": "string" } } }, "entities.RoleEntity": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } } }, "entities.UserEntity": { "type": "object", "properties": { "created_at": { "type": "string" }, "date_of_birth": { "type": "string" }, "email": { "type": "string" }, "gender": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "password": { "type": "string" }, "phone": { "type": "string" }, "photo": { "type": "string" }, "role": { "$ref": "#/definitions/entities.RoleEntity" }, "status": { "type": "integer" }, "updated_at": { "type": "string" }, "username": { "type": "string" } } }, "response.Response": { "type": "object", "properties": { "data": {}, "error": {}, "message": { "type": "string" }, "status_code": { "type": "integer" } } } } }