add today endpoint

This commit is contained in:
kandrusyak
2023-08-16 21:21:05 +03:00
parent 2054c44aa2
commit 11c0d1b989
3 changed files with 126 additions and 22 deletions

View File

@@ -43,6 +43,25 @@
}
}
},
"/events/today": {
"get": {
"tags": [
"Events"
],
"operationId": "GetEvents",
"responses": {
"200": {
"description": "Event",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Event"
}
}
}
}
}
},
"/events/{uuid}": {
"get": {
"tags": [
@@ -68,9 +87,26 @@
}
},
"definitions": {
"Contact": {
"type": "object",
"properties": {
"category": {
"type": "string",
"x-go-name": "Category"
},
"value": {
"type": "string",
"x-go-name": "Value"
}
},
"x-go-package": "astra-events/model"
},
"CreateEvent": {
"type": "object",
"required": [
"start",
"end",
"person",
"medic_id"
],
"properties": {
@@ -115,8 +151,8 @@
"$ref": "#/definitions/DeletedAt"
},
"ID": {
"type": "string",
"format": "uuid"
"type": "integer",
"format": "uint64"
},
"UpdatedAt": {
"type": "string",
@@ -130,11 +166,16 @@
"format": "date-time",
"x-go-name": "End"
},
"id": {
"type": "string",
"format": "uuid",
"x-go-name": "ID"
},
"medic": {
"$ref": "#/definitions/User"
},
"person": {
"$ref": "#/definitions/PersonalInformation"
"$ref": "#/definitions/PersonalInformationApi"
},
"start": {
"type": "string",
@@ -219,6 +260,40 @@
},
"x-go-package": "astra-events/model"
},
"PersonalInformationApi": {
"type": "object",
"properties": {
"birth_date": {
"type": "string",
"x-go-name": "BirthDate"
},
"contacts": {
"type": "array",
"items": {
"$ref": "#/definitions/Contact"
},
"x-go-name": "Contacts"
},
"first_name": {
"type": "string",
"x-go-name": "FirstName"
},
"id": {
"type": "string",
"format": "uuid",
"x-go-name": "ID"
},
"last_name": {
"type": "string",
"x-go-name": "LastName"
},
"patronymic": {
"type": "string",
"x-go-name": "Patronymic"
}
},
"x-go-package": "astra-events/model"
},
"User": {
"type": "object",
"properties": {