{ "openapi": "3.0.1", "info": { "title": "presence_api", "version": "1.0" }, "paths": { "/api/Group": { "get": { "tags": [ "Group" ], "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GroupDao" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GroupDao" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GroupDao" } } } } } } } }, "/api/Presence": { "get": { "tags": [ "Presence" ], "parameters": [ { "name": "GroupId", "in": "query", "schema": { "type": "integer", "format": "int32" } }, { "name": "StartData", "in": "query", "schema": { "type": "string", "format": "date" } }, { "name": "EndData", "in": "query", "schema": { "type": "string", "format": "date" } }, { "name": "UserId", "in": "query", "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PresenceDao" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PresenceDao" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PresenceDao" } } } } } } }, "delete": { "tags": [ "Presence" ], "parameters": [ { "name": "GroupId", "in": "query", "schema": { "type": "integer", "format": "int32" } }, { "name": "UserId", "in": "query", "schema": { "type": "integer", "format": "int32" } }, { "name": "StartDate", "in": "query", "schema": { "type": "string", "format": "date" } }, { "name": "EndDate", "in": "query", "schema": { "type": "string", "format": "date" } } ], "responses": { "200": { "description": "OK" } } } }, "/api/Presence/update": { "post": { "tags": [ "Presence" ], "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AttendanceInputModel" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AttendanceInputModel" } } }, "application/*+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AttendanceInputModel" } } } } }, "responses": { "200": { "description": "OK" } } } }, "/api/Presence/mark-absent": { "post": { "tags": [ "Presence" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MarkAbsenceRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/MarkAbsenceRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/MarkAbsenceRequest" } } } }, "responses": { "200": { "description": "OK" } } } } }, "components": { "schemas": { "AttendanceInputModel": { "type": "object", "properties": { "groupId": { "type": "integer", "format": "int32" }, "userId": { "type": "integer", "format": "int32" }, "date": { "type": "string", "format": "date" }, "lessonNumber": { "type": "integer", "format": "int32" }, "isAttendance": { "type": "boolean" } }, "additionalProperties": false }, "GroupDao": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32" }, "name": { "type": "string", "nullable": true }, "users": { "type": "array", "items": { "$ref": "#/components/schemas/UserDao" }, "nullable": true } }, "additionalProperties": false }, "MarkAbsenceRequest": { "type": "object", "properties": { "userId": { "type": "integer", "format": "int32" }, "groupId": { "type": "integer", "format": "int32" }, "date": { "type": "string", "format": "date" }, "lessonNumber": { "type": "integer", "format": "int32" } }, "additionalProperties": false }, "PresenceDao": { "type": "object", "properties": { "presenceId": { "type": "integer", "format": "int32" }, "userId": { "type": "integer", "format": "int32" }, "isAttedance": { "type": "boolean" }, "date": { "type": "string", "format": "date" }, "lessonNumber": { "type": "integer", "format": "int32" }, "groupId": { "type": "integer", "format": "int32" } }, "additionalProperties": false }, "UserDao": { "required": [ "fio", "userId" ], "type": "object", "properties": { "fio": { "type": "string", "nullable": true }, "userId": { "type": "integer", "format": "int32" }, "groupId": { "type": "integer", "format": "int32" }, "group": { "$ref": "#/components/schemas/GroupDao" } }, "additionalProperties": false } } } }