{ "swagger": "2.0", "paths": { "/events/": { "get": { "tags": [ "Events" ], "operationId": "GetEvents", "responses": { "200": { "description": "Event", "schema": { "type": "array", "items": { "$ref": "#/definitions/Event" } } } } }, "post": { "tags": [ "Events" ], "operationId": "CreateEvent", "parameters": [ { "name": "CreateEvent", "in": "body", "schema": { "$ref": "#/definitions/CreateEvent" } } ], "responses": { "200": { "description": "Event", "schema": { "$ref": "#/definitions/Event" } } } } }, "/events/{uuid}": { "get": { "tags": [ "Events" ], "operationId": "GetEvent", "responses": { "200": { "description": "Event", "schema": { "$ref": "#/definitions/Event" } } } }, "delete": { "tags": [ "Events" ], "operationId": "DeleteEvent", "responses": {} } } }, "definitions": { "CreateEvent": { "type": "object", "required": [ "medic_id" ], "properties": { "end": { "description": "The event end time", "type": "string", "format": "date-time", "x-go-name": "End", "example": "2023-08-02T19:21:23.617Z" }, "medic_id": { "description": "The UUID of a medic", "type": "string", "format": "uuid", "x-go-name": "MedicId", "example": "6204037c-30e6-408b-8aaa-dd8219860b4b" }, "person": { "$ref": "#/definitions/PersonalInformation" }, "start": { "description": "The event start time", "type": "string", "format": "date-time", "x-go-name": "Start", "example": "2023-08-02T19:21:23.617Z" } }, "x-go-package": "astra-events/model" }, "DeletedAt": { "$ref": "#/definitions/NullTime" }, "Event": { "type": "object", "properties": { "CreatedAt": { "type": "string", "format": "date-time" }, "DeletedAt": { "$ref": "#/definitions/DeletedAt" }, "ID": { "type": "string", "format": "uuid" }, "UpdatedAt": { "type": "string", "format": "date-time" }, "author": { "$ref": "#/definitions/User" }, "end": { "type": "string", "format": "date-time", "x-go-name": "End" }, "medic": { "$ref": "#/definitions/User" }, "person": { "$ref": "#/definitions/PersonalInformation" }, "start": { "type": "string", "format": "date-time", "x-go-name": "Start" } }, "x-go-package": "astra-events/model" }, "Model": { "description": "type User struct {\ngorm.Model\n}", "type": "object", "title": "Model a basic GoLang struct which includes the following fields: ID, CreatedAt, UpdatedAt, DeletedAt\nIt may be embedded into your model or you may build your own model without it", "properties": { "CreatedAt": { "type": "string", "format": "date-time" }, "DeletedAt": { "$ref": "#/definitions/DeletedAt" }, "ID": { "type": "integer", "format": "uint64" }, "UpdatedAt": { "type": "string", "format": "date-time" } }, "x-go-package": "gorm.io/gorm" }, "NullTime": { "description": "NullTime implements the Scanner interface so\nit can be used as a scan destination, similar to NullString.", "type": "object", "title": "NullTime represents a time.Time that may be null.", "properties": { "Time": { "type": "string", "format": "date-time" }, "Valid": { "type": "boolean" } }, "x-go-package": "database/sql" }, "PersonalInformation": { "type": "object", "properties": { "first_name": { "description": "The first name of a person", "type": "string", "x-go-name": "FirstName", "example": "Иван" }, "id": { "description": "The UUID of a person", "type": "string", "format": "uuid", "x-go-name": "ID", "example": "6204037c-30e6-408b-8aaa-dd8219860b4b" }, "last_name": { "description": "The last name of a person", "type": "string", "x-go-name": "LastName", "example": "Иванов" }, "patronymic": { "description": "The patronymic of a person", "type": "string", "x-go-name": "Patronymic", "example": "Иванович" }, "phone": { "description": "The first name of a person", "type": "string", "x-go-name": "Phone", "example": "79206321370" } }, "x-go-package": "astra-events/model" }, "User": { "type": "object", "properties": { "CreatedAt": { "type": "string", "format": "date-time" }, "DeletedAt": { "$ref": "#/definitions/DeletedAt" }, "ID": { "type": "string", "format": "uuid" }, "UpdatedAt": { "type": "string", "format": "date-time" }, "first_name": { "type": "string", "x-go-name": "FirstName" }, "last_name": { "type": "string", "x-go-name": "LastName" }, "password": { "type": "string", "x-go-name": "Password" }, "user_name": { "type": "string", "x-go-name": "UserName" } }, "x-go-package": "astra-events/model" } } }