> For the complete documentation index, see [llms.txt](https://docs.codebattles.ru/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.codebattles.ru/api/backend/models.md).

# Models

## The InternalServerErrorResponse object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"InternalServerErrorResponse":{"type":"object","description":"Response returned when an unexpected error occurs on the server.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}}}}}
```

## The ConflictResponse object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"ConflictResponse":{"type":"object","description":"Response returned when the conflict in data.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}}}}}
```

## The UnauthorizedResponse object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"UnauthorizedResponse":{"type":"object","description":"Response returned when the user is not authenticated.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}}}}}
```

## The AccessDeniedResponse object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"AccessDeniedResponse":{"type":"object","description":"Response returned when the user does not have permission to access the requested resource.","properties":{"message":{"type":"string","description":"Detailed message about the error."},"code":{"type":"integer","format":"int32","description":"HTTP status code representing the error."}}}}}}
```

## The UserProfileEditDto object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"UserProfileEditDto":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}}}}
```

## The UserProfileDto object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"UserProfileDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"username":{"type":"string"},"name":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}}},"required":["id","name","roles","username"]}}}}
```

## The CompetitionEditDto object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"CompetitionEditDto":{"type":"object","properties":{"name":{"type":"string","description":"Name of the competition"},"description":{"type":"string","description":"Description of the competition"},"startedAt":{"type":"string","format":"date-time","description":"Start time of the competition"},"endedAt":{"type":"string","format":"date-time","description":"End time of the competition"},"public":{"type":"boolean","description":"If public everyone can join into competition"},"showInput":{"type":"boolean"},"showOutput":{"type":"boolean"},"showRating":{"type":"boolean"}},"required":["description","name","public","showInput","showOutput","showRating"]}}}}
```

## The CheckerDto object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"CheckerDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier of the checker"},"displayName":{"type":"string","description":"Display name of the checker"},"languageHighlightName":{"type":"string","description":"Programming language used by the checker"}},"required":["displayName","languageHighlightName"]}}}}
```

## The CompetitionDto object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"CompetitionDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier of the competition"},"checkers":{"type":"array","description":"Set of checkers associated with the competition","items":{"$ref":"#/components/schemas/CheckerDto"},"uniqueItems":true},"name":{"type":"string","description":"Name of the competition"},"description":{"type":"string","description":"Description of the competition"},"startedAt":{"type":"string","format":"date-time","description":"Start time of the competition"},"endedAt":{"type":"string","format":"date-time","description":"End time of the competition"},"public":{"type":"boolean","description":"If public everyone can join into competition"},"showInput":{"type":"boolean"},"showOutput":{"type":"boolean"},"showRating":{"type":"boolean"}},"required":["description","id","name","public","showInput","showOutput","showRating"]},"CheckerDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier of the checker"},"displayName":{"type":"string","description":"Display name of the checker"},"languageHighlightName":{"type":"string","description":"Programming language used by the checker"}},"required":["displayName","languageHighlightName"]}}}}
```

## The EditUsersRequest object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"EditUsersRequest":{"type":"object","description":"Request to edit users","properties":{"usersIds":{"type":"array","description":"Set of user IDs to be edited","items":{"type":"integer","format":"int64"},"uniqueItems":true}},"required":["usersIds"]}}}}
```

## The CreateUserDto object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"CreateUserDto":{"type":"object","properties":{"musername":{"type":"string","description":"Username of the user","minLength":1},"mpassword":{"type":"string","description":"Password of the user","minLength":1},"name":{"type":"string","description":"Full name of the user"}},"required":["mpassword","musername"]}}}}
```

## The UserDto object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"UserDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier of the user"},"username":{"type":"string","description":"Username of the user"}},"required":["id","username"]}}}}
```

## The LinkUserRequest object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"LinkUserRequest":{"type":"object","description":"Request to link a user to a competition","properties":{"userId":{"type":"integer","format":"int64","description":"ID of the user"},"competitionId":{"type":"integer","format":"int64","description":"ID of the competition"}},"required":["competitionId","userId"]}}}}
```

## The OkResponse object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"OkResponse":{"type":"object","description":"Response indicating success","properties":{"status":{"type":"string","description":"Status of the response"}},"required":["status"]}}}}
```

## The ChangePasswordDto object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"ChangePasswordDto":{"type":"object","properties":{"currentPassword":{"type":"string"},"newPassword":{"type":"string"}},"required":["currentPassword","newPassword"]}}}}
```

## The CreateProblemDto object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"CreateProblemDto":{"type":"object","properties":{"name":{"type":"string","description":"Name of the problem"},"description":{"type":"string","description":"Description of the problem"},"inData":{"type":"string","description":"Input data for the problem"},"outData":{"type":"string","description":"Expected output data for the problem"},"tests":{"type":"string","description":"Test cases for the problem (JSON)"}},"required":["description","examples","inData","name","outData","tests"]}}}}
```

## The ProblemDto object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"ProblemDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier of the problem"},"name":{"type":"string","description":"Name of the problem"},"description":{"type":"string","description":"Description of the problem"},"inData":{"type":"string","description":"Input data for the problem"},"outData":{"type":"string","description":"Expected output data for the problem"},"public":{"type":"boolean","description":"Indicates if the problem is public"}},"required":["description","examples","id","inData","name","outData"]}}}}
```

## The CompetitionCreateDto object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"CompetitionCreateDto":{"type":"object","properties":{"name":{"type":"string","description":"Name of the competition"},"description":{"type":"string","description":"Description of the competition"},"startedAt":{"type":"string","format":"date-time","description":"Start time of the competition"},"endedAt":{"type":"string","format":"date-time","description":"End time of the competition"}},"required":["description","name"]}}}}
```

## The CreateCompetitionProblem object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"CreateCompetitionProblem":{"type":"object","description":"Details for creating a competition problem","properties":{"priority":{"type":"integer","format":"int64","description":"Priority of the problem in the competition"},"slug":{"type":"string","description":"Slug identifier for the problem"},"competition_id":{"type":"integer","format":"int64","description":"ID of the competition"},"problem_id":{"type":"integer","format":"int64","description":"ID of the problem"}},"required":["competition_id","priority","problem_id","slug"]}}}}
```

## The CompetitionsProblemsDto object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"CompetitionsProblemsDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier of the competition problem"},"priority":{"type":"integer","format":"int32","description":"Priority of problem for sorting"},"problem":{"$ref":"#/components/schemas/ProblemDto","description":"Unique identifier of the competition problem"},"slug":{"type":"string","description":"Unique identifier of the competition problem"}},"required":["id","priority","problem","slug"]},"ProblemDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier of the problem"},"name":{"type":"string","description":"Name of the problem"},"description":{"type":"string","description":"Description of the problem"},"inData":{"type":"string","description":"Input data for the problem"},"outData":{"type":"string","description":"Expected output data for the problem"},"public":{"type":"boolean","description":"Indicates if the problem is public"}},"required":["description","examples","id","inData","name","outData"]}}}}
```

## The SendAnswerRequest object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"SendAnswerRequest":{"type":"object","description":"Request to send an answer","properties":{"checker":{"type":"integer","format":"int64","description":"ID of the checker"},"src":{"type":"string","description":"Source code submitted as the answer"},"id":{"type":"integer","format":"int64","description":"ID of the answer"}},"required":["checker","id","src"]}}}}
```

## The CheckerCreate object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"CheckerCreate":{"type":"object","description":"Details for creating a new checker","properties":{"displayName":{"type":"string","description":"Display name of the checker"},"languageHighlightName":{"type":"string","description":"Language highlight name for the checker"},"address":{"type":"string","description":"Address of the checker service"}},"required":["address","displayName","languageHighlightName"]}}}}
```

## The Checker object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"Checker":{"type":"object","properties":{"displayName":{"type":"string"},"languageHighlightName":{"type":"string"},"address":{"type":"string"},"id":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["address","displayName","languageHighlightName"]}}}}
```

## The CheckerCallback object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"CheckerCallback":{"type":"object","description":"Callback response from the checker","properties":{"results":{"type":"array","description":"List of program results","items":{"$ref":"#/components/schemas/ProgramResult"}},"meta":{"type":"integer","format":"int64","description":"Metadata associated with the callback"}},"required":["meta","results"]},"ProgramResult":{"type":"object","description":"Result of a program execution","properties":{"success":{"type":"boolean","description":"Indicates if the execution was successful"},"out":{"type":"string","description":"Output of the program"},"msg":{"type":"string","description":"Status message of the execution","enum":["OK","RE","CE","TL","WA","NE"]},"time":{"type":"integer","format":"int32","description":"Execution time in milliseconds"}},"required":["msg","out","success","time"]}}}}
```

## The ProgramResult object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"ProgramResult":{"type":"object","description":"Result of a program execution","properties":{"success":{"type":"boolean","description":"Indicates if the execution was successful"},"out":{"type":"string","description":"Output of the program"},"msg":{"type":"string","description":"Status message of the execution","enum":["OK","RE","CE","TL","WA","NE"]},"time":{"type":"integer","format":"int32","description":"Execution time in milliseconds"}},"required":["msg","out","success","time"]}}}}
```

## The RegisterRequest object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"RegisterRequest":{"type":"object","description":"Request for user authentication","properties":{"username":{"type":"string","description":"Username of the user"},"password":{"type":"string","description":"Password of the user"},"name":{"type":"string","description":"Name of the user"}},"required":["name","password","username"]}}}}
```

## The AuthResponse object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"AuthResponse":{"type":"object","description":"Response containing authentication token","properties":{"token":{"type":"string","description":"JWT token for authentication"}},"required":["token"]}}}}
```

## The AuthRequest object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"AuthRequest":{"type":"object","description":"Request for user authentication","properties":{"username":{"type":"string","description":"Username of the user"},"password":{"type":"string","description":"Password of the user"}},"required":["password","username"]}}}}
```

## The JsonNode object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"JsonNode":{}}}}
```

## The Problem object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"Problem":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"description":{"type":"string"},"inData":{"type":"string"},"outData":{"type":"string"},"tests":{"type":"string"}},"required":["description","examples","id","inData","name","outData","tests"]}}}}
```

## The GrantedAuthority object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"GrantedAuthority":{"type":"object","properties":{"authority":{"type":"string"}}}}}}
```

## The User object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"User":{"type":"object","properties":{"musername":{"type":"string"},"mpassword":{"type":"string"},"name":{"type":"string"},"roles":{"type":"array","items":{"type":"string","enum":["USER","ROLE_ADMIN","TESTTTSTCBEUYBEYUBYUCYUBYUBUBY","SYSADMIN"]},"uniqueItems":true},"id":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"authorities":{"type":"array","items":{"$ref":"#/components/schemas/GrantedAuthority"}},"isAdmin":{"type":"boolean"},"username":{"type":"string"},"password":{"type":"string"},"enabled":{"type":"boolean"},"credentialsNonExpired":{"type":"boolean"},"accountNonExpired":{"type":"boolean"},"accountNonLocked":{"type":"boolean"}},"required":["authorities","isAdmin","roles"]},"GrantedAuthority":{"type":"object","properties":{"authority":{"type":"string"}}}}}}
```

## The RenderedError object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"RenderedError":{"type":"object","description":"Details of an error response","properties":{"detail":{"type":"string","description":"Detailed error message"}},"required":["detail"]}}}}
```

## The Competition object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"Competition":{"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/User"},"uniqueItems":true},"checkers":{"type":"array","items":{"$ref":"#/components/schemas/Checker"},"uniqueItems":true},"organizer":{"$ref":"#/components/schemas/User"},"name":{"type":"string"},"description":{"type":"string"},"startedAt":{"type":"string","format":"date-time"},"endedAt":{"type":"string","format":"date-time"},"showRating":{"type":"boolean"},"showOutput":{"type":"boolean"},"showInput":{"type":"boolean"},"public":{"type":"boolean"},"id":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["description","name","public","showInput","showOutput","showRating"]},"User":{"type":"object","properties":{"musername":{"type":"string"},"mpassword":{"type":"string"},"name":{"type":"string"},"roles":{"type":"array","items":{"type":"string","enum":["USER","ROLE_ADMIN","TESTTTSTCBEUYBEYUBYUCYUBYUBUBY","SYSADMIN"]},"uniqueItems":true},"id":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"authorities":{"type":"array","items":{"$ref":"#/components/schemas/GrantedAuthority"}},"isAdmin":{"type":"boolean"},"username":{"type":"string"},"password":{"type":"string"},"enabled":{"type":"boolean"},"credentialsNonExpired":{"type":"boolean"},"accountNonExpired":{"type":"boolean"},"accountNonLocked":{"type":"boolean"}},"required":["authorities","isAdmin","roles"]},"GrantedAuthority":{"type":"object","properties":{"authority":{"type":"string"}}},"Checker":{"type":"object","properties":{"displayName":{"type":"string"},"languageHighlightName":{"type":"string"},"address":{"type":"string"},"id":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["address","displayName","languageHighlightName"]}}}}
```

## The CompetitionsProblems object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"CompetitionsProblems":{"type":"object","properties":{"priority":{"type":"integer","format":"int32"},"slug":{"type":"string"},"competition":{"$ref":"#/components/schemas/Competition"},"problem":{"$ref":"#/components/schemas/Problem"},"id":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["competition","priority","problem","slug"]},"Competition":{"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/User"},"uniqueItems":true},"checkers":{"type":"array","items":{"$ref":"#/components/schemas/Checker"},"uniqueItems":true},"organizer":{"$ref":"#/components/schemas/User"},"name":{"type":"string"},"description":{"type":"string"},"startedAt":{"type":"string","format":"date-time"},"endedAt":{"type":"string","format":"date-time"},"showRating":{"type":"boolean"},"showOutput":{"type":"boolean"},"showInput":{"type":"boolean"},"public":{"type":"boolean"},"id":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["description","name","public","showInput","showOutput","showRating"]},"User":{"type":"object","properties":{"musername":{"type":"string"},"mpassword":{"type":"string"},"name":{"type":"string"},"roles":{"type":"array","items":{"type":"string","enum":["USER","ROLE_ADMIN","TESTTTSTCBEUYBEYUBYUCYUBYUBUBY","SYSADMIN"]},"uniqueItems":true},"id":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"authorities":{"type":"array","items":{"$ref":"#/components/schemas/GrantedAuthority"}},"isAdmin":{"type":"boolean"},"username":{"type":"string"},"password":{"type":"string"},"enabled":{"type":"boolean"},"credentialsNonExpired":{"type":"boolean"},"accountNonExpired":{"type":"boolean"},"accountNonLocked":{"type":"boolean"}},"required":["authorities","isAdmin","roles"]},"GrantedAuthority":{"type":"object","properties":{"authority":{"type":"string"}}},"Checker":{"type":"object","properties":{"displayName":{"type":"string"},"languageHighlightName":{"type":"string"},"address":{"type":"string"},"id":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["address","displayName","languageHighlightName"]},"Problem":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"description":{"type":"string"},"inData":{"type":"string"},"outData":{"type":"string"},"tests":{"type":"string"}},"required":["description","examples","id","inData","name","outData","tests"]}}}}
```

## The PageMetadata object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"PageMetadata":{"type":"object","properties":{"size":{"type":"integer","format":"int64"},"number":{"type":"integer","format":"int64"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int64"}}}}}}
```

## The PagedModelCompetitionsProblems object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"PagedModelCompetitionsProblems":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/CompetitionsProblems"}},"page":{"$ref":"#/components/schemas/PageMetadata"}}},"CompetitionsProblems":{"type":"object","properties":{"priority":{"type":"integer","format":"int32"},"slug":{"type":"string"},"competition":{"$ref":"#/components/schemas/Competition"},"problem":{"$ref":"#/components/schemas/Problem"},"id":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["competition","priority","problem","slug"]},"Competition":{"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/User"},"uniqueItems":true},"checkers":{"type":"array","items":{"$ref":"#/components/schemas/Checker"},"uniqueItems":true},"organizer":{"$ref":"#/components/schemas/User"},"name":{"type":"string"},"description":{"type":"string"},"startedAt":{"type":"string","format":"date-time"},"endedAt":{"type":"string","format":"date-time"},"showRating":{"type":"boolean"},"showOutput":{"type":"boolean"},"showInput":{"type":"boolean"},"public":{"type":"boolean"},"id":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["description","name","public","showInput","showOutput","showRating"]},"User":{"type":"object","properties":{"musername":{"type":"string"},"mpassword":{"type":"string"},"name":{"type":"string"},"roles":{"type":"array","items":{"type":"string","enum":["USER","ROLE_ADMIN","TESTTTSTCBEUYBEYUBYUCYUBYUBUBY","SYSADMIN"]},"uniqueItems":true},"id":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"authorities":{"type":"array","items":{"$ref":"#/components/schemas/GrantedAuthority"}},"isAdmin":{"type":"boolean"},"username":{"type":"string"},"password":{"type":"string"},"enabled":{"type":"boolean"},"credentialsNonExpired":{"type":"boolean"},"accountNonExpired":{"type":"boolean"},"accountNonLocked":{"type":"boolean"}},"required":["authorities","isAdmin","roles"]},"GrantedAuthority":{"type":"object","properties":{"authority":{"type":"string"}}},"Checker":{"type":"object","properties":{"displayName":{"type":"string"},"languageHighlightName":{"type":"string"},"address":{"type":"string"},"id":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["address","displayName","languageHighlightName"]},"Problem":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"description":{"type":"string"},"inData":{"type":"string"},"outData":{"type":"string"},"tests":{"type":"string"}},"required":["description","examples","id","inData","name","outData","tests"]},"PageMetadata":{"type":"object","properties":{"size":{"type":"integer","format":"int64"},"number":{"type":"integer","format":"int64"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int64"}}}}}}
```

## The AnswerDto object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"AnswerDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier of the answer"},"user":{"$ref":"#/components/schemas/UserDto","description":"User who submitted the answer"},"status":{"type":"string","description":"Current status of the answer","enum":["IN_PROGRESS","COMPLETED"]},"score":{"type":"integer","format":"int32","description":"Score awarded for the answer"},"code":{"type":"string","description":"Code submitted by the user"},"result":{"type":"string","description":"Result of the code execution"},"checker":{"$ref":"#/components/schemas/CheckerDto","description":"Checker used to evaluate the answer"},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the answer was created"},"competitionsProblems":{"$ref":"#/components/schemas/CompetitionsProblemsDto","description":"Details of the competition problem associated with the answer"}},"required":["checker","code","createdAt","status","user"]},"UserDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier of the user"},"username":{"type":"string","description":"Username of the user"}},"required":["id","username"]},"CheckerDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier of the checker"},"displayName":{"type":"string","description":"Display name of the checker"},"languageHighlightName":{"type":"string","description":"Programming language used by the checker"}},"required":["displayName","languageHighlightName"]},"CompetitionsProblemsDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier of the competition problem"},"priority":{"type":"integer","format":"int32","description":"Priority of problem for sorting"},"problem":{"$ref":"#/components/schemas/ProblemDto","description":"Unique identifier of the competition problem"},"slug":{"type":"string","description":"Unique identifier of the competition problem"}},"required":["id","priority","problem","slug"]},"ProblemDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Unique identifier of the problem"},"name":{"type":"string","description":"Name of the problem"},"description":{"type":"string","description":"Description of the problem"},"inData":{"type":"string","description":"Input data for the problem"},"outData":{"type":"string","description":"Expected output data for the problem"},"public":{"type":"boolean","description":"Indicates if the problem is public"}},"required":["description","examples","id","inData","name","outData"]}}}}
```

## The LeaderBoardAllTasksQuery object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"LeaderBoardAllTasksQuery":{"type":"object","properties":{"userId":{"type":"integer","format":"int64"},"competitionproblemId":{"type":"integer","format":"int64"},"maxScore":{"type":"integer","format":"int64"}},"required":["competitionproblemId","maxScore","userId"]}}}}
```

## The LeaderBoardScoreOrderQuery object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"LeaderBoardScoreOrderQuery":{"type":"object","properties":{"userId":{"type":"integer","format":"int64"},"userX":{"type":"string"},"score":{"type":"integer","format":"int64"},"time":{"type":"string","format":"date-time"}},"required":["score","time","userId","userX"]}}}}
```

## The Leaderboard object

```json
{"openapi":"3.1.0","info":{"title":"Codebattles backend","version":"0.1.0"},"components":{"schemas":{"Leaderboard":{"type":"object","properties":{"score":{"type":"array","items":{"$ref":"#/components/schemas/LeaderBoardScoreOrderQuery"}},"data":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/LeaderBoardAllTasksQuery"}}}},"required":["data","score"]},"LeaderBoardScoreOrderQuery":{"type":"object","properties":{"userId":{"type":"integer","format":"int64"},"userX":{"type":"string"},"score":{"type":"integer","format":"int64"},"time":{"type":"string","format":"date-time"}},"required":["score","time","userId","userX"]},"LeaderBoardAllTasksQuery":{"type":"object","properties":{"userId":{"type":"integer","format":"int64"},"competitionproblemId":{"type":"integer","format":"int64"},"maxScore":{"type":"integer","format":"int64"}},"required":["competitionproblemId","maxScore","userId"]}}}}
```
