{ "openapi": "3.0.1", "info": { "title": "presence_api", "version": "1.0" }, "paths": { "/AddStudent": { "post": { "tags": [ "Admin" ], "parameters": [ { "name": "GroupName", "in": "query", "schema": { "type": "string" } }, { "name": "students", "in": "query", "schema": { "type": "array", "items": { "type": "string" } } } ], "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "type": "string" } }, "application/json": { "schema": { "type": "string" } }, "text/json": { "schema": { "type": "string" } } } } } } }, "/GetStudentInfo": { "get": { "tags": [ "Admin" ], "parameters": [ { "name": "userId", "in": "query", "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/UserResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/UserResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/UserResponse" } } } } } } }, "/GetAllGroupsWithStudents": { "get": { "tags": [ "Admin" ], "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GroupResponse" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GroupResponse" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GroupResponse" } } } } } } } }, "/DeleteUserId": { "delete": { "tags": [ "Admin" ], "parameters": [ { "name": "userId", "in": "query", "schema": { "type": "integer", "format": "int32" } }, { "name": "groupId", "in": "query", "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "type": "string" } }, "application/json": { "schema": { "type": "string" } }, "text/json": { "schema": { "type": "string" } } } } } } }, "/DeleteGroupId": { "delete": { "tags": [ "Admin" ], "parameters": [ { "name": "groupId", "in": "query", "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "type": "string" } }, "application/json": { "schema": { "type": "string" } }, "text/json": { "schema": { "type": "string" } } } } } } }, "/api/Group": { "get": { "tags": [ "Group" ], "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Group" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Group" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Group" } } } } } } } }, "/IsAttendence": { "post": { "tags": [ "Presence" ], "parameters": [ { "name": "FirstClass", "in": "query", "schema": { "type": "integer", "format": "int32" } }, { "name": "LastClass", "in": "query", "schema": { "type": "integer", "format": "int32" } }, { "name": "Data", "in": "query", "schema": { "type": "string" } }, { "name": "UserId", "in": "query", "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/PresenceResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/PresenceResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/PresenceResponse" } } } } } } }, "/AddPresence": { "post": { "tags": [ "Presence" ], "parameters": [ { "name": "GroupId", "in": "query", "schema": { "type": "integer", "format": "int32" } }, { "name": "StartData", "in": "query", "schema": { "type": "string" } }, { "name": "EndData", "in": "query", "schema": { "type": "string" } }, { "name": "UserId", "in": "query", "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Presence" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Presence" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Presence" } } } } } } } }, "/api/Presence": { "get": { "tags": [ "Presence" ], "parameters": [ { "name": "groupId", "in": "query", "schema": { "type": "integer", "format": "int32" } }, { "name": "startDataString", "in": "query", "schema": { "type": "string" } }, { "name": "endDataString", "in": "query", "schema": { "type": "string" } }, { "name": "userId", "in": "query", "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Presence" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Presence" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Presence" } } } } } } } }, "/DeleteByUser": { "delete": { "tags": [ "Presence" ], "parameters": [ { "name": "UserId", "in": "query", "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PresenceResponse" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PresenceResponse" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PresenceResponse" } } } } } } } }, "/DeleteByGroup": { "delete": { "tags": [ "Presence" ], "parameters": [ { "name": "GroupId", "in": "query", "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PresenceResponse" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PresenceResponse" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PresenceResponse" } } } } } } } }, "/DeleteByDate": { "delete": { "tags": [ "Presence" ], "parameters": [ { "name": "StartData", "in": "query", "schema": { "type": "string" } }, { "name": "EndData", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PresenceResponse" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PresenceResponse" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PresenceResponse" } } } } } } } } }, "components": { "schemas": { "Group": { "required": [ "id", "name" ], "type": "object", "properties": { "id": { "type": "integer", "format": "int32" }, "name": { "type": "string", "nullable": true } }, "additionalProperties": false }, "GroupResponse": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32" }, "name": { "type": "string", "nullable": true }, "user": { "type": "array", "items": { "$ref": "#/components/schemas/UserResponse" }, "nullable": true } }, "additionalProperties": false }, "Presence": { "required": [ "date", "user" ], "type": "object", "properties": { "date": { "type": "string", "format": "date" }, "classNumber": { "type": "integer", "format": "int32" }, "isAttendence": { "type": "boolean" }, "user": { "$ref": "#/components/schemas/User" } }, "additionalProperties": false }, "PresenceResponse": { "required": [ "date", "user" ], "type": "object", "properties": { "date": { "type": "string", "format": "date" }, "classNumber": { "type": "integer", "format": "int32" }, "isAttendence": { "type": "boolean" }, "user": { "$ref": "#/components/schemas/UserResponse" } }, "additionalProperties": false }, "User": { "required": [ "fio", "groupId" ], "type": "object", "properties": { "fio": { "type": "string", "nullable": true }, "id": { "type": "integer", "format": "int32" }, "groupId": { "$ref": "#/components/schemas/Group" } }, "additionalProperties": false }, "UserResponse": { "required": [ "fio" ], "type": "object", "properties": { "fio": { "type": "string", "nullable": true }, "id": { "type": "integer", "format": "int32" }, "groupId": { "type": "integer", "format": "int32" }, "group": { "$ref": "#/components/schemas/GroupResponse" } }, "additionalProperties": false } } } }