diff --git a/packages/api-server/docs/api.yaml b/packages/api-server/docs/api.yaml deleted file mode 100644 index 2fe43259..00000000 --- a/packages/api-server/docs/api.yaml +++ /dev/null @@ -1,10449 +0,0 @@ -swagger: "2.0" -info: - version: 8.8.0 - title: "@fastify/swagger" -definitions: {} -paths: - /v1/heartbeat/: - get: - responses: - "200": - description: Default Response - schema: - type: object - properties: - version: - type: string - name: - type: string - online: - type: boolean - required: - - version - - name - - online - /v1/sessions/: - post: - parameters: - - name: body - in: body - schema: - type: object - properties: - usernameOrEmail: - type: string - password: - type: string - required: - - usernameOrEmail - - password - responses: - "200": - description: Default Response - schema: - type: object - properties: - userId: - type: string - sessionId: - type: string - required: - - userId - - sessionId - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - get: - responses: - "200": - description: Default Response - schema: - type: array - items: - type: object - properties: - id: - type: string - userId: - type: string - userAgent: - type: string - loginIP: - type: string - required: - - id - - userId - - userAgent - - loginIP - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - /v1/current-session/: - get: - responses: - "200": - description: Default Response - schema: - anyOf: - - type: object - properties: - session: - type: object - properties: - userId: - type: string - sessionId: - type: string - required: - - userId - - sessionId - profile: - type: object - allOf: - - type: object - properties: - name: - type: string - email: - type: string - username: - type: string - year: - type: number - school: - type: string - country: - type: string - region: - type: string - role: - anyOf: - - type: string - enum: - - User - - type: string - enum: - - Admin - - type: string - enum: - - Judger - id: - type: string - newEmail: - type: string - scopes: - type: object - additionalProperties: - type: string - teams: - type: object - additionalProperties: - type: string - required: - - name - - username - - year - - school - - country - - region - - role - - id - - scopes - - teams - - type: object - properties: - gravatar: - type: string - required: - - session - - profile - - type: "null" - delete: - responses: - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - /v1/users/: - post: - parameters: - - name: body - in: body - schema: - additionalProperties: false - type: object - properties: - name: - maxLength: 32 - type: string - email: - maxLength: 32 - format: email - type: string - password: - maxLength: 32 - minLength: 8 - type: string - username: - maxLength: 32 - pattern: ^[A-Za-z0-9_]*$ - type: string - year: - maximum: 2100 - minimum: 1900 - type: number - school: - maxLength: 48 - type: string - country: - maxLength: 32 - type: string - region: - maxLength: 32 - type: string - required: - - name - - email - - password - - username - - year - - school - - country - - region - responses: - "201": - description: Default Response - schema: - type: object - properties: - userId: - type: string - required: - - userId - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "409": - description: Error returned when the requested resource already exists. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource already exists. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 409 - example: 409 - error: - type: string - description: The error HTTP status description - enum: - - Conflict - example: Conflict - message: - type: string - description: The error message - pattern: .+ - example: Conflict. - code: - type: string - description: The error code - enum: - - Conflict - example: Conflict - required: - - statusCode - - error - - message - additionalProperties: false - get: - parameters: - - type: string - required: true - in: query - name: query - - type: string - required: false - in: query - name: noteam - responses: - "200": - description: Default Response - schema: - type: array - items: - type: object - allOf: - - type: object - properties: - name: - type: string - username: - type: string - id: - type: string - required: - - name - - username - - id - - type: object - properties: - gravatar: - type: string - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "/v1/users/{userId}/profiles/public": - get: - parameters: - - type: string - required: true - in: path - name: userId - responses: - "200": - description: Default Response - schema: - type: object - allOf: - - type: object - properties: - name: - type: string - username: - type: string - id: - type: string - required: - - name - - username - - id - - type: object - properties: - gravatar: - type: string - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - "/v1/users/{userId}/profiles/private": - get: - parameters: - - type: string - required: true - in: path - name: userId - responses: - "200": - description: Default Response - schema: - type: object - allOf: - - type: object - properties: - name: - type: string - email: - type: string - username: - type: string - year: - type: number - school: - type: string - country: - type: string - region: - type: string - role: - anyOf: - - type: string - enum: - - User - - type: string - enum: - - Admin - - type: string - enum: - - Judger - id: - type: string - newEmail: - type: string - scopes: - type: object - additionalProperties: - type: string - teams: - type: object - additionalProperties: - type: string - required: - - name - - username - - year - - school - - country - - region - - role - - id - - scopes - - teams - - type: object - properties: - gravatar: - type: string - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - "/v1/users/{userId}/email-verifications/": - post: - parameters: - - type: string - required: true - in: path - name: userId - responses: - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "/v1/users/{userId}/email-verifications/{verificationId}": - post: - parameters: - - type: string - required: true - in: path - name: verificationId - responses: - "200": - description: Default Response - schema: - type: object - properties: - modified: - type: boolean - required: - - modified - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - "/v1/users/{userId}/contests/{contestId}/invitations/{invitationId}": - post: - parameters: - - type: string - required: true - in: path - name: contestId - - type: string - required: true - in: path - name: userId - - type: string - required: true - in: path - name: invitationId - responses: - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - "/v1/users/{userId}/submissions/": - get: - parameters: - - type: string - required: true - in: path - name: userId - responses: - "200": - description: Default Response - schema: - type: array - items: - anyOf: - - type: object - allOf: - - type: object - properties: - language: - anyOf: - - type: string - enum: - - C - - type: string - enum: - - C++ - - type: string - enum: - - Python - source: - type: string - id: - type: string - problemId: - type: string - domainId: - type: string - contestId: - type: string - teamId: - type: string - userId: - type: string - createdAt: - type: number - required: - - language - - source - - id - - problemId - - domainId - - userId - - createdAt - - type: object - properties: - status: - type: string - enum: - - Compiling - required: - - status - - type: object - allOf: - - type: object - properties: - language: - anyOf: - - type: string - enum: - - C - - type: string - enum: - - C++ - - type: string - enum: - - Python - source: - type: string - id: - type: string - problemId: - type: string - domainId: - type: string - contestId: - type: string - teamId: - type: string - userId: - type: string - createdAt: - type: number - required: - - language - - source - - id - - problemId - - domainId - - userId - - createdAt - - type: object - properties: - status: - type: string - enum: - - Grading - gradedCases: - type: number - testcases: - type: array - items: - type: object - properties: - points: - type: number - score: - type: number - result: - anyOf: - - type: object - properties: - status: - type: string - enum: - - AC - message: - type: string - memory: - type: number - time: - type: number - wallTime: - type: number - required: - - status - - message - - memory - - time - - wallTime - - type: object - properties: - status: - type: string - enum: - - WA - message: - type: string - memory: - type: number - time: - type: number - wallTime: - type: number - required: - - status - - message - - memory - - time - - wallTime - - type: object - properties: - status: - type: string - enum: - - SE - message: - type: string - required: - - status - - message - - type: object - properties: - status: - type: string - enum: - - TLE - message: - type: string - time: - type: number - wallTime: - type: number - required: - - status - - message - - time - - wallTime - - type: object - properties: - status: - type: string - enum: - - RE - message: - type: string - required: - - status - - message - - type: object - properties: - status: - type: string - enum: - - MLE - message: - type: string - memory: - type: number - required: - - status - - message - - memory - required: - - points - required: - - status - - gradedCases - - testcases - - type: object - allOf: - - type: object - properties: - language: - anyOf: - - type: string - enum: - - C - - type: string - enum: - - C++ - - type: string - enum: - - Python - source: - type: string - id: - type: string - problemId: - type: string - domainId: - type: string - contestId: - type: string - teamId: - type: string - userId: - type: string - createdAt: - type: number - required: - - language - - source - - id - - problemId - - domainId - - userId - - createdAt - - type: object - properties: - status: - type: string - enum: - - Graded - score: - type: number - testcases: - type: array - items: - type: object - properties: - points: - type: number - score: - type: number - result: - anyOf: - - type: object - properties: - status: - type: string - enum: - - AC - message: - type: string - memory: - type: number - time: - type: number - wallTime: - type: number - required: - - status - - message - - memory - - time - - wallTime - - type: object - properties: - status: - type: string - enum: - - WA - message: - type: string - memory: - type: number - time: - type: number - wallTime: - type: number - required: - - status - - message - - memory - - time - - wallTime - - type: object - properties: - status: - type: string - enum: - - SE - message: - type: string - required: - - status - - message - - type: object - properties: - status: - type: string - enum: - - TLE - message: - type: string - time: - type: number - wallTime: - type: number - required: - - status - - message - - time - - wallTime - - type: object - properties: - status: - type: string - enum: - - RE - message: - type: string - required: - - status - - message - - type: object - properties: - status: - type: string - enum: - - MLE - message: - type: string - memory: - type: number - required: - - status - - message - - memory - required: - - points - - score - - result - required: - - status - - score - - testcases - - type: object - allOf: - - type: object - properties: - language: - anyOf: - - type: string - enum: - - C - - type: string - enum: - - C++ - - type: string - enum: - - Python - source: - type: string - id: - type: string - problemId: - type: string - domainId: - type: string - contestId: - type: string - teamId: - type: string - userId: - type: string - createdAt: - type: number - required: - - language - - source - - id - - problemId - - domainId - - userId - - createdAt - - type: object - properties: - status: - type: string - enum: - - CompileFailed - log: - type: string - required: - - status - - type: object - allOf: - - type: object - properties: - language: - anyOf: - - type: string - enum: - - C - - type: string - enum: - - C++ - - type: string - enum: - - Python - source: - type: string - id: - type: string - problemId: - type: string - domainId: - type: string - contestId: - type: string - teamId: - type: string - userId: - type: string - createdAt: - type: number - required: - - language - - source - - id - - problemId - - domainId - - userId - - createdAt - - type: object - properties: - status: - type: string - enum: - - Terminated - log: - type: string - required: - - status - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "/v1/users/{userId}/submissions/{submissionId}": - get: - parameters: - - type: string - required: true - in: path - name: userId - - type: string - required: true - in: path - name: submissionId - responses: - "200": - description: Default Response - schema: - anyOf: - - type: object - allOf: - - type: object - properties: - language: - anyOf: - - type: string - enum: - - C - - type: string - enum: - - C++ - - type: string - enum: - - Python - source: - type: string - id: - type: string - problemId: - type: string - domainId: - type: string - contestId: - type: string - teamId: - type: string - userId: - type: string - createdAt: - type: number - required: - - language - - source - - id - - problemId - - domainId - - userId - - createdAt - - type: object - properties: - status: - type: string - enum: - - Compiling - required: - - status - - type: object - allOf: - - type: object - properties: - language: - anyOf: - - type: string - enum: - - C - - type: string - enum: - - C++ - - type: string - enum: - - Python - source: - type: string - id: - type: string - problemId: - type: string - domainId: - type: string - contestId: - type: string - teamId: - type: string - userId: - type: string - createdAt: - type: number - required: - - language - - source - - id - - problemId - - domainId - - userId - - createdAt - - type: object - properties: - status: - type: string - enum: - - Grading - gradedCases: - type: number - testcases: - type: array - items: - type: object - properties: - points: - type: number - score: - type: number - result: - anyOf: - - type: object - properties: - status: - type: string - enum: - - AC - message: - type: string - memory: - type: number - time: - type: number - wallTime: - type: number - required: - - status - - message - - memory - - time - - wallTime - - type: object - properties: - status: - type: string - enum: - - WA - message: - type: string - memory: - type: number - time: - type: number - wallTime: - type: number - required: - - status - - message - - memory - - time - - wallTime - - type: object - properties: - status: - type: string - enum: - - SE - message: - type: string - required: - - status - - message - - type: object - properties: - status: - type: string - enum: - - TLE - message: - type: string - time: - type: number - wallTime: - type: number - required: - - status - - message - - time - - wallTime - - type: object - properties: - status: - type: string - enum: - - RE - message: - type: string - required: - - status - - message - - type: object - properties: - status: - type: string - enum: - - MLE - message: - type: string - memory: - type: number - required: - - status - - message - - memory - required: - - points - required: - - status - - gradedCases - - testcases - - type: object - allOf: - - type: object - properties: - language: - anyOf: - - type: string - enum: - - C - - type: string - enum: - - C++ - - type: string - enum: - - Python - source: - type: string - id: - type: string - problemId: - type: string - domainId: - type: string - contestId: - type: string - teamId: - type: string - userId: - type: string - createdAt: - type: number - required: - - language - - source - - id - - problemId - - domainId - - userId - - createdAt - - type: object - properties: - status: - type: string - enum: - - Graded - score: - type: number - testcases: - type: array - items: - type: object - properties: - points: - type: number - score: - type: number - result: - anyOf: - - type: object - properties: - status: - type: string - enum: - - AC - message: - type: string - memory: - type: number - time: - type: number - wallTime: - type: number - required: - - status - - message - - memory - - time - - wallTime - - type: object - properties: - status: - type: string - enum: - - WA - message: - type: string - memory: - type: number - time: - type: number - wallTime: - type: number - required: - - status - - message - - memory - - time - - wallTime - - type: object - properties: - status: - type: string - enum: - - SE - message: - type: string - required: - - status - - message - - type: object - properties: - status: - type: string - enum: - - TLE - message: - type: string - time: - type: number - wallTime: - type: number - required: - - status - - message - - time - - wallTime - - type: object - properties: - status: - type: string - enum: - - RE - message: - type: string - required: - - status - - message - - type: object - properties: - status: - type: string - enum: - - MLE - message: - type: string - memory: - type: number - required: - - status - - message - - memory - required: - - points - - score - - result - required: - - status - - score - - testcases - - type: object - allOf: - - type: object - properties: - language: - anyOf: - - type: string - enum: - - C - - type: string - enum: - - C++ - - type: string - enum: - - Python - source: - type: string - id: - type: string - problemId: - type: string - domainId: - type: string - contestId: - type: string - teamId: - type: string - userId: - type: string - createdAt: - type: number - required: - - language - - source - - id - - problemId - - domainId - - userId - - createdAt - - type: object - properties: - status: - type: string - enum: - - CompileFailed - log: - type: string - required: - - status - - type: object - allOf: - - type: object - properties: - language: - anyOf: - - type: string - enum: - - C - - type: string - enum: - - C++ - - type: string - enum: - - Python - source: - type: string - id: - type: string - problemId: - type: string - domainId: - type: string - contestId: - type: string - teamId: - type: string - userId: - type: string - createdAt: - type: number - required: - - language - - source - - id - - problemId - - domainId - - userId - - createdAt - - type: object - properties: - status: - type: string - enum: - - Terminated - log: - type: string - required: - - status - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - /v1/domains/: - post: - parameters: - - name: body - in: body - schema: - additionalProperties: false - type: object - properties: - name: - type: string - description: - type: string - required: - - name - - description - responses: - "201": - description: Default Response - schema: - type: object - properties: - domainId: - type: string - required: - - domainId - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "/v1/domains/{domainId}": - get: - parameters: - - type: string - required: true - in: path - name: domainId - responses: - "200": - description: Default Response - schema: - type: object - properties: - name: - type: string - description: - type: string - id: - type: string - members: - type: array - items: - type: string - required: - - name - - description - - members - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - put: - parameters: - - name: body - in: body - schema: - additionalProperties: false - type: object - properties: - name: - type: string - description: - type: string - required: - - name - - description - - type: string - required: true - in: path - name: domainId - responses: - "200": - description: Default Response - schema: - type: object - properties: - modified: - type: boolean - required: - - modified - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - "/v1/domains/{domainId}/members/": - post: - parameters: - - name: body - in: body - schema: - type: object - properties: - userId: - type: string - scopes: - type: array - items: - type: string - required: - - userId - - scopes - - type: string - required: true - in: path - name: domainId - responses: - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - get: - parameters: - - type: string - required: true - in: path - name: domainId - responses: - "200": - description: Default Response - schema: - type: array - items: - type: object - allOf: - - type: object - properties: - name: - type: string - username: - type: string - id: - type: string - required: - - name - - username - - id - - type: object - properties: - gravatar: - type: string - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - "/v1/domains/{domainId}/members/{userId}": - delete: - parameters: - - type: string - required: true - in: path - name: domainId - - type: string - required: true - in: path - name: userId - responses: - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - put: - parameters: - - name: body - in: body - schema: - type: object - properties: - scopes: - type: array - items: - type: string - required: - - scopes - - type: string - required: true - in: path - name: domainId - - type: string - required: true - in: path - name: userId - responses: - "200": - description: Default Response - schema: - type: object - properties: - modified: - type: boolean - required: - - modified - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - "/v1/domains/{domainId}/problems/": - post: - parameters: - - name: body - in: body - schema: - additionalProperties: false - type: object - properties: - name: - type: string - context: - type: string - inputFormat: - type: string - outputFormat: - type: string - constraints: - additionalProperties: false - type: object - properties: - memory: - type: number - time: - type: number - wallTime: - type: number - totalStorage: - type: number - processes: - type: number - samples: - type: array - items: - type: object - properties: - input: - type: string - output: - type: string - required: - - input - - output - testcases: - type: array - items: - type: object - properties: - input: - type: object - properties: - name: - type: string - versionId: - type: string - required: - - name - - versionId - output: - type: object - properties: - name: - type: string - versionId: - type: string - required: - - name - - versionId - points: - type: number - required: - - input - - output - - points - required: - - name - - context - - inputFormat - - outputFormat - - constraints - - samples - - type: string - required: true - in: path - name: domainId - responses: - "201": - description: Default Response - schema: - type: object - properties: - problemId: - type: string - required: - - problemId - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - get: - parameters: - - type: string - required: true - in: path - name: domainId - responses: - "200": - description: Default Response - schema: - type: array - items: - type: object - properties: - name: - type: string - context: - type: string - inputFormat: - type: string - outputFormat: - type: string - constraints: - additionalProperties: false - type: object - properties: - memory: - type: number - time: - type: number - wallTime: - type: number - totalStorage: - type: number - processes: - type: number - samples: - type: array - items: - type: object - properties: - input: - type: string - output: - type: string - required: - - input - - output - testcases: - type: array - items: - type: object - properties: - input: - type: object - properties: - name: - type: string - versionId: - type: string - required: - - name - - versionId - output: - type: object - properties: - name: - type: string - versionId: - type: string - required: - - name - - versionId - points: - type: number - required: - - input - - output - - points - id: - type: string - domainId: - type: string - required: - - name - - context - - inputFormat - - outputFormat - - constraints - - samples - - id - - domainId - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "/v1/domains/{domainId}/problems/{problemId}": - put: - parameters: - - name: body - in: body - schema: - additionalProperties: false - type: object - properties: - name: - type: string - context: - type: string - inputFormat: - type: string - outputFormat: - type: string - constraints: - additionalProperties: false - type: object - properties: - memory: - type: number - time: - type: number - wallTime: - type: number - totalStorage: - type: number - processes: - type: number - samples: - type: array - items: - type: object - properties: - input: - type: string - output: - type: string - required: - - input - - output - testcases: - type: array - items: - type: object - properties: - input: - type: object - properties: - name: - type: string - versionId: - type: string - required: - - name - - versionId - output: - type: object - properties: - name: - type: string - versionId: - type: string - required: - - name - - versionId - points: - type: number - required: - - input - - output - - points - required: - - name - - context - - inputFormat - - outputFormat - - constraints - - samples - - type: string - required: true - in: path - name: domainId - - type: string - required: true - in: path - name: problemId - responses: - "200": - description: Default Response - schema: - type: object - properties: - modified: - type: boolean - required: - - modified - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - delete: - parameters: - - type: string - required: true - in: path - name: domainId - - type: string - required: true - in: path - name: problemId - responses: - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - get: - parameters: - - type: string - required: true - in: path - name: domainId - - type: string - required: true - in: path - name: problemId - responses: - "200": - description: Default Response - schema: - type: object - properties: - name: - type: string - context: - type: string - inputFormat: - type: string - outputFormat: - type: string - constraints: - additionalProperties: false - type: object - properties: - memory: - type: number - time: - type: number - wallTime: - type: number - totalStorage: - type: number - processes: - type: number - samples: - type: array - items: - type: object - properties: - input: - type: string - output: - type: string - required: - - input - - output - testcases: - type: array - items: - type: object - properties: - input: - type: object - properties: - name: - type: string - versionId: - type: string - required: - - name - - versionId - output: - type: object - properties: - name: - type: string - versionId: - type: string - required: - - name - - versionId - points: - type: number - required: - - input - - output - - points - id: - type: string - domainId: - type: string - required: - - name - - context - - inputFormat - - outputFormat - - constraints - - samples - - id - - domainId - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - "/v1/domains/{domainId}/problems/{problemId}/submissions": - post: - parameters: - - name: body - in: body - schema: - additionalProperties: false - type: object - properties: - language: - anyOf: - - type: string - enum: - - C - - type: string - enum: - - C++ - - type: string - enum: - - Python - source: - type: string - required: - - language - - source - - type: string - required: true - in: path - name: domainId - - type: string - required: true - in: path - name: problemId - responses: - "202": - description: Default Response - schema: - type: object - properties: - submissionId: - type: string - required: - - submissionId - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - "405": - description: Error returned when the requested method resource is not available. - schema: - type: object - $id: todo.com - description: Error returned when the requested method resource is not available. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 405 - example: 405 - error: - type: string - description: The error HTTP status description - enum: - - Method Not Allowed - example: Method Not Allowed - message: - type: string - description: The error message - pattern: .+ - example: Method Not Allowed. - code: - type: string - description: The error code - enum: - - Method Not Allowed - example: Method Not Allowed - required: - - statusCode - - error - - message - additionalProperties: false - "/v1/domains/{domainId}/problems/{problemId}/upload-session": - get: - parameters: - - type: string - required: true - in: path - name: domainId - - type: string - required: true - in: path - name: problemId - responses: - "200": - description: Default Response - schema: - type: object - properties: - uploadId: - type: string - required: - - uploadId - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - "/v1/domains/{domainId}/contests/": - post: - parameters: - - name: body - in: body - schema: - additionalProperties: false - type: object - properties: - name: - type: string - description: - type: string - startTime: - type: number - endTime: - type: number - teamSize: - type: number - handle: - type: string - seriesId: - type: string - required: - - name - - description - - startTime - - endTime - - teamSize - - handle - - seriesId - - type: string - required: true - in: path - name: domainId - responses: - "201": - description: Default Response - schema: - type: object - properties: - contestId: - type: string - required: - - contestId - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - get: - parameters: - - type: string - required: true - in: path - name: domainId - responses: - "200": - description: Default Response - schema: - type: array - items: - type: object - properties: - name: - type: string - description: - type: string - startTime: - type: number - endTime: - type: number - teamSize: - type: number - handle: - type: string - seriesId: - type: string - domainId: - type: string - id: - type: string - published: - type: boolean - required: - - name - - description - - startTime - - endTime - - teamSize - - handle - - seriesId - - domainId - - id - - published - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "/v1/domains/{domainId}/contest-series/": - post: - parameters: - - name: body - in: body - schema: - type: object - properties: - name: - type: string - required: - - name - - type: string - required: true - in: path - name: domainId - responses: - "201": - description: Default Response - schema: - type: object - properties: - seriesId: - type: string - required: - - seriesId - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - get: - parameters: - - type: string - required: true - in: path - name: domainId - responses: - "200": - description: Default Response - schema: - type: array - items: - type: object - properties: - name: - type: string - description: - type: string - startTime: - type: number - endTime: - type: number - teamSize: - type: number - handle: - type: string - seriesId: - type: string - domainId: - type: string - id: - type: string - published: - type: boolean - required: - - name - - description - - startTime - - endTime - - teamSize - - handle - - seriesId - - domainId - - id - - published - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - /v1/judger/language-config: - get: - responses: - "200": - description: Default Response - schema: - type: object - properties: - C: - type: object - properties: - srcFile: - type: string - binaryFile: - type: string - displayName: - type: string - compileCommand: - type: string - executeCommand: - type: string - constraints: - additionalProperties: false - type: object - properties: - memory: - type: number - time: - type: number - wallTime: - type: number - totalStorage: - type: number - processes: - type: number - required: - - srcFile - - binaryFile - - displayName - - compileCommand - - executeCommand - - constraints - C++: - type: object - properties: - srcFile: - type: string - binaryFile: - type: string - displayName: - type: string - compileCommand: - type: string - executeCommand: - type: string - constraints: - additionalProperties: false - type: object - properties: - memory: - type: number - time: - type: number - wallTime: - type: number - totalStorage: - type: number - processes: - type: number - required: - - srcFile - - binaryFile - - displayName - - compileCommand - - executeCommand - - constraints - Python: - type: object - properties: - srcFile: - type: string - binaryFile: - type: string - displayName: - type: string - compileCommand: - type: string - executeCommand: - type: string - constraints: - additionalProperties: false - type: object - properties: - memory: - type: number - time: - type: number - wallTime: - type: number - totalStorage: - type: number - processes: - type: number - required: - - srcFile - - binaryFile - - displayName - - compileCommand - - executeCommand - - constraints - required: - - C - - C++ - - Python - "/v1/contests/{contestId}": - get: - parameters: - - type: string - required: true - in: path - name: contestId - responses: - "200": - description: Default Response - schema: - type: object - properties: - name: - type: string - description: - type: string - startTime: - type: number - endTime: - type: number - teamSize: - type: number - handle: - type: string - seriesId: - type: string - domainId: - type: string - id: - type: string - published: - type: boolean - required: - - name - - description - - startTime - - endTime - - teamSize - - handle - - seriesId - - domainId - - id - - published - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - put: - parameters: - - name: body - in: body - schema: - additionalProperties: false - type: object - properties: - name: - type: string - description: - type: string - startTime: - type: number - endTime: - type: number - teamSize: - type: number - handle: - type: string - required: - - name - - description - - startTime - - endTime - - teamSize - - handle - - type: string - required: true - in: path - name: contestId - responses: - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - "/v1/contests/{contestId}/publish": - post: - parameters: - - type: string - required: true - in: path - name: contestId - responses: - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - "/v1/contests/{contestId}/problems/": - get: - parameters: - - type: string - required: true - in: path - name: contestId - responses: - "200": - description: Default Response - schema: - type: object - properties: - id: - type: string - problems: - type: array - items: - type: object - allOf: - - type: object - properties: - name: - type: string - id: - type: string - required: - - name - - id - - type: object - properties: {} - required: - - id - - problems - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - "/v1/contests/{contestId}/problems/{problemId}": - get: - parameters: - - type: string - required: true - in: path - name: contestId - - type: string - required: true - in: path - name: problemId - responses: - "200": - description: Default Response - schema: - type: object - allOf: - - type: object - properties: - name: - type: string - context: - type: string - inputFormat: - type: string - outputFormat: - type: string - constraints: - additionalProperties: false - type: object - properties: - memory: - type: number - time: - type: number - wallTime: - type: number - totalStorage: - type: number - processes: - type: number - samples: - type: array - items: - type: object - properties: - input: - type: string - output: - type: string - required: - - input - - output - testcases: - type: array - items: - type: object - properties: - input: - type: object - properties: - name: - type: string - versionId: - type: string - required: - - name - - versionId - output: - type: object - properties: - name: - type: string - versionId: - type: string - required: - - name - - versionId - points: - type: number - required: - - input - - output - - points - id: - type: string - domainId: - type: string - required: - - name - - context - - inputFormat - - outputFormat - - constraints - - samples - - id - - domainId - - type: object - properties: - contestId: - type: string - obsolete: - type: boolean - required: - - contestId - - obsolete - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - put: - parameters: - - type: string - required: true - in: path - name: contestId - - type: string - required: true - in: path - name: problemId - responses: - "200": - description: Default Response - schema: - type: object - properties: - modified: - type: boolean - required: - - modified - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - delete: - parameters: - - type: string - required: true - in: path - name: contestId - - type: string - required: true - in: path - name: problemId - responses: - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - "/v1/contests/{contestId}/problems/{problemId}/submissions": - post: - parameters: - - name: body - in: body - schema: - additionalProperties: false - type: object - properties: - language: - anyOf: - - type: string - enum: - - C - - type: string - enum: - - C++ - - type: string - enum: - - Python - source: - type: string - required: - - language - - source - - type: string - required: true - in: path - name: contestId - - type: string - required: true - in: path - name: problemId - responses: - "202": - description: Default Response - schema: - type: object - properties: - submissionId: - type: string - required: - - submissionId - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - get: - parameters: - - type: string - required: true - in: path - name: contestId - - type: string - required: true - in: path - name: problemId - responses: - "200": - description: Default Response - schema: - type: array - items: - anyOf: - - type: object - allOf: - - type: object - properties: - language: - anyOf: - - type: string - enum: - - C - - type: string - enum: - - C++ - - type: string - enum: - - Python - source: - type: string - id: - type: string - problemId: - type: string - domainId: - type: string - contestId: - type: string - teamId: - type: string - userId: - type: string - createdAt: - type: number - required: - - language - - source - - id - - problemId - - domainId - - userId - - createdAt - - type: object - properties: - status: - type: string - enum: - - Compiling - required: - - status - - type: object - allOf: - - type: object - properties: - language: - anyOf: - - type: string - enum: - - C - - type: string - enum: - - C++ - - type: string - enum: - - Python - source: - type: string - id: - type: string - problemId: - type: string - domainId: - type: string - contestId: - type: string - teamId: - type: string - userId: - type: string - createdAt: - type: number - required: - - language - - source - - id - - problemId - - domainId - - userId - - createdAt - - type: object - properties: - status: - type: string - enum: - - Grading - gradedCases: - type: number - testcases: - type: array - items: - type: object - properties: - points: - type: number - score: - type: number - result: - anyOf: - - type: object - properties: - status: - type: string - enum: - - AC - message: - type: string - memory: - type: number - time: - type: number - wallTime: - type: number - required: - - status - - message - - memory - - time - - wallTime - - type: object - properties: - status: - type: string - enum: - - WA - message: - type: string - memory: - type: number - time: - type: number - wallTime: - type: number - required: - - status - - message - - memory - - time - - wallTime - - type: object - properties: - status: - type: string - enum: - - SE - message: - type: string - required: - - status - - message - - type: object - properties: - status: - type: string - enum: - - TLE - message: - type: string - time: - type: number - wallTime: - type: number - required: - - status - - message - - time - - wallTime - - type: object - properties: - status: - type: string - enum: - - RE - message: - type: string - required: - - status - - message - - type: object - properties: - status: - type: string - enum: - - MLE - message: - type: string - memory: - type: number - required: - - status - - message - - memory - required: - - points - required: - - status - - gradedCases - - testcases - - type: object - allOf: - - type: object - properties: - language: - anyOf: - - type: string - enum: - - C - - type: string - enum: - - C++ - - type: string - enum: - - Python - source: - type: string - id: - type: string - problemId: - type: string - domainId: - type: string - contestId: - type: string - teamId: - type: string - userId: - type: string - createdAt: - type: number - required: - - language - - source - - id - - problemId - - domainId - - userId - - createdAt - - type: object - properties: - status: - type: string - enum: - - Graded - score: - type: number - testcases: - type: array - items: - type: object - properties: - points: - type: number - score: - type: number - result: - anyOf: - - type: object - properties: - status: - type: string - enum: - - AC - message: - type: string - memory: - type: number - time: - type: number - wallTime: - type: number - required: - - status - - message - - memory - - time - - wallTime - - type: object - properties: - status: - type: string - enum: - - WA - message: - type: string - memory: - type: number - time: - type: number - wallTime: - type: number - required: - - status - - message - - memory - - time - - wallTime - - type: object - properties: - status: - type: string - enum: - - SE - message: - type: string - required: - - status - - message - - type: object - properties: - status: - type: string - enum: - - TLE - message: - type: string - time: - type: number - wallTime: - type: number - required: - - status - - message - - time - - wallTime - - type: object - properties: - status: - type: string - enum: - - RE - message: - type: string - required: - - status - - message - - type: object - properties: - status: - type: string - enum: - - MLE - message: - type: string - memory: - type: number - required: - - status - - message - - memory - required: - - points - - score - - result - required: - - status - - score - - testcases - - type: object - allOf: - - type: object - properties: - language: - anyOf: - - type: string - enum: - - C - - type: string - enum: - - C++ - - type: string - enum: - - Python - source: - type: string - id: - type: string - problemId: - type: string - domainId: - type: string - contestId: - type: string - teamId: - type: string - userId: - type: string - createdAt: - type: number - required: - - language - - source - - id - - problemId - - domainId - - userId - - createdAt - - type: object - properties: - status: - type: string - enum: - - CompileFailed - log: - type: string - required: - - status - - type: object - allOf: - - type: object - properties: - language: - anyOf: - - type: string - enum: - - C - - type: string - enum: - - C++ - - type: string - enum: - - Python - source: - type: string - id: - type: string - problemId: - type: string - domainId: - type: string - contestId: - type: string - teamId: - type: string - userId: - type: string - createdAt: - type: number - required: - - language - - source - - id - - problemId - - domainId - - userId - - createdAt - - type: object - properties: - status: - type: string - enum: - - Terminated - log: - type: string - required: - - status - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "/v1/contests/{contestId}/teams/": - post: - parameters: - - name: body - in: body - schema: - additionalProperties: false - type: object - properties: - name: - type: string - required: - - name - - type: string - required: true - in: path - name: contestId - responses: - "201": - description: Default Response - schema: - type: object - properties: - teamId: - type: string - required: - - teamId - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - "409": - description: Error returned when the requested resource already exists. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource already exists. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 409 - example: 409 - error: - type: string - description: The error HTTP status description - enum: - - Conflict - example: Conflict - message: - type: string - description: The error message - pattern: .+ - example: Conflict. - code: - type: string - description: The error code - enum: - - Conflict - example: Conflict - required: - - statusCode - - error - - message - additionalProperties: false - "/v1/contests/{contestId}/teams/{teamId}": - get: - parameters: - - type: string - required: true - in: path - name: contestId - - type: string - required: true - in: path - name: teamId - responses: - "200": - description: Default Response - schema: - type: object - properties: - name: - type: string - id: - type: string - contestId: - type: string - captain: - type: string - members: - type: array - items: - type: string - required: - - name - - id - - contestId - - captain - - members - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - delete: - parameters: - - type: string - required: true - in: path - name: contestId - - type: string - required: true - in: path - name: teamId - responses: - "200": - description: Default Response - "/v1/contests/{contestId}/teams/{teamId}/invitations": - post: - parameters: - - name: body - in: body - schema: - type: object - properties: - userId: - type: string - required: - - userId - - type: string - required: true - in: path - name: contestId - - type: string - required: true - in: path - name: teamId - responses: - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - get: - parameters: - - type: string - required: true - in: path - name: contestId - - type: string - required: true - in: path - name: teamId - responses: - "200": - description: Default Response - schema: - type: array - items: - type: object - properties: - id: - type: string - teamId: - type: string - userId: - type: string - contestId: - type: string - createdAt: - type: number - required: - - id - - teamId - - userId - - contestId - - createdAt - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "/v1/contests/{contestId}/teams/{teamId}/invitations/{invitationId}": - delete: - parameters: - - type: string - required: true - in: path - name: contestId - - type: string - required: true - in: path - name: teamId - - type: string - required: true - in: path - name: invitationId - responses: - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - post: - parameters: - - type: string - required: true - in: path - name: contestId - - type: string - required: true - in: path - name: teamId - - type: string - required: true - in: path - name: invitationId - responses: - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - "/v1/contests/{contestId}/teams/{teamId}/members": - get: - parameters: - - type: string - required: true - in: path - name: contestId - - type: string - required: true - in: path - name: teamId - responses: - "200": - description: Default Response - schema: - type: array - items: - type: object - allOf: - - type: object - properties: - name: - type: string - username: - type: string - id: - type: string - required: - - name - - username - - id - - type: object - properties: - gravatar: - type: string - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - "/v1/contests/{contestId}/teams/{teamId}/members/{userId}": - delete: - parameters: - - type: string - required: true - in: path - name: contestId - - type: string - required: true - in: path - name: teamId - - type: string - required: true - in: path - name: userId - responses: - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - "405": - description: Error returned when the requested method resource is not available. - schema: - type: object - $id: todo.com - description: Error returned when the requested method resource is not available. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 405 - example: 405 - error: - type: string - description: The error HTTP status description - enum: - - Method Not Allowed - example: Method Not Allowed - message: - type: string - description: The error message - pattern: .+ - example: Method Not Allowed. - code: - type: string - description: The error code - enum: - - Method Not Allowed - example: Method Not Allowed - required: - - statusCode - - error - - message - additionalProperties: false - "/v1/contests/{contestId}/teams/{teamId}/captain": - put: - parameters: - - name: body - in: body - schema: - type: object - properties: - userId: - type: string - required: - - userId - - type: string - required: true - in: path - name: contestId - - type: string - required: true - in: path - name: teamId - responses: - "200": - description: Default Response - schema: - type: object - properties: - modified: - type: boolean - required: - - modified - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - "/v1/contests/{contestId}/teams/{teamId}/submissions": - get: - parameters: - - type: string - required: true - in: path - name: contestId - - type: string - required: true - in: path - name: teamId - responses: - "200": - description: Default Response - schema: - type: array - items: - anyOf: - - type: object - allOf: - - type: object - properties: - language: - anyOf: - - type: string - enum: - - C - - type: string - enum: - - C++ - - type: string - enum: - - Python - source: - type: string - id: - type: string - problemId: - type: string - domainId: - type: string - contestId: - type: string - teamId: - type: string - userId: - type: string - createdAt: - type: number - required: - - language - - source - - id - - problemId - - domainId - - userId - - createdAt - - type: object - properties: - status: - type: string - enum: - - Compiling - required: - - status - - type: object - allOf: - - type: object - properties: - language: - anyOf: - - type: string - enum: - - C - - type: string - enum: - - C++ - - type: string - enum: - - Python - source: - type: string - id: - type: string - problemId: - type: string - domainId: - type: string - contestId: - type: string - teamId: - type: string - userId: - type: string - createdAt: - type: number - required: - - language - - source - - id - - problemId - - domainId - - userId - - createdAt - - type: object - properties: - status: - type: string - enum: - - Grading - gradedCases: - type: number - testcases: - type: array - items: - type: object - properties: - points: - type: number - score: - type: number - result: - anyOf: - - type: object - properties: - status: - type: string - enum: - - AC - message: - type: string - memory: - type: number - time: - type: number - wallTime: - type: number - required: - - status - - message - - memory - - time - - wallTime - - type: object - properties: - status: - type: string - enum: - - WA - message: - type: string - memory: - type: number - time: - type: number - wallTime: - type: number - required: - - status - - message - - memory - - time - - wallTime - - type: object - properties: - status: - type: string - enum: - - SE - message: - type: string - required: - - status - - message - - type: object - properties: - status: - type: string - enum: - - TLE - message: - type: string - time: - type: number - wallTime: - type: number - required: - - status - - message - - time - - wallTime - - type: object - properties: - status: - type: string - enum: - - RE - message: - type: string - required: - - status - - message - - type: object - properties: - status: - type: string - enum: - - MLE - message: - type: string - memory: - type: number - required: - - status - - message - - memory - required: - - points - required: - - status - - gradedCases - - testcases - - type: object - allOf: - - type: object - properties: - language: - anyOf: - - type: string - enum: - - C - - type: string - enum: - - C++ - - type: string - enum: - - Python - source: - type: string - id: - type: string - problemId: - type: string - domainId: - type: string - contestId: - type: string - teamId: - type: string - userId: - type: string - createdAt: - type: number - required: - - language - - source - - id - - problemId - - domainId - - userId - - createdAt - - type: object - properties: - status: - type: string - enum: - - Graded - score: - type: number - testcases: - type: array - items: - type: object - properties: - points: - type: number - score: - type: number - result: - anyOf: - - type: object - properties: - status: - type: string - enum: - - AC - message: - type: string - memory: - type: number - time: - type: number - wallTime: - type: number - required: - - status - - message - - memory - - time - - wallTime - - type: object - properties: - status: - type: string - enum: - - WA - message: - type: string - memory: - type: number - time: - type: number - wallTime: - type: number - required: - - status - - message - - memory - - time - - wallTime - - type: object - properties: - status: - type: string - enum: - - SE - message: - type: string - required: - - status - - message - - type: object - properties: - status: - type: string - enum: - - TLE - message: - type: string - time: - type: number - wallTime: - type: number - required: - - status - - message - - time - - wallTime - - type: object - properties: - status: - type: string - enum: - - RE - message: - type: string - required: - - status - - message - - type: object - properties: - status: - type: string - enum: - - MLE - message: - type: string - memory: - type: number - required: - - status - - message - - memory - required: - - points - - score - - result - required: - - status - - score - - testcases - - type: object - allOf: - - type: object - properties: - language: - anyOf: - - type: string - enum: - - C - - type: string - enum: - - C++ - - type: string - enum: - - Python - source: - type: string - id: - type: string - problemId: - type: string - domainId: - type: string - contestId: - type: string - teamId: - type: string - userId: - type: string - createdAt: - type: number - required: - - language - - source - - id - - problemId - - domainId - - userId - - createdAt - - type: object - properties: - status: - type: string - enum: - - CompileFailed - log: - type: string - required: - - status - - type: object - allOf: - - type: object - properties: - language: - anyOf: - - type: string - enum: - - C - - type: string - enum: - - C++ - - type: string - enum: - - Python - source: - type: string - id: - type: string - problemId: - type: string - domainId: - type: string - contestId: - type: string - teamId: - type: string - userId: - type: string - createdAt: - type: number - required: - - language - - source - - id - - problemId - - domainId - - userId - - createdAt - - type: object - properties: - status: - type: string - enum: - - Terminated - log: - type: string - required: - - status - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "401": - description: Error returned when client does not provide any valid authorization. - schema: - type: object - $id: todo.com - description: Error returned when client does not provide any valid - authorization. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 401 - example: 401 - error: - type: string - description: The error HTTP status description - enum: - - Unauthorized - example: Unauthorized - message: - type: string - description: The error message - pattern: .+ - example: Unauthorized. - code: - type: string - description: The error code - enum: - - Unauthorized - example: Unauthorized - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "/v1/contests/{contestId}/ranklist/": - get: - parameters: - - type: string - required: true - in: path - name: contestId - responses: - "200": - description: Default Response - schema: - type: array - items: - type: object - properties: - id: - type: string - contestId: - type: string - scores: - type: object - additionalProperties: - type: string - time: - type: object - additionalProperties: - type: string - totalScore: - type: number - lastTime: - type: number - required: - - id - - contestId - - scores - - time - - totalScore - - lastTime - "400": - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - schema: - type: object - $id: todo.com - description: Error returned when the client payload is either invalid, malformed - or has logical validation errors. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 400 - example: 400 - error: - type: string - description: The error HTTP status description - enum: - - Bad Request - example: Bad Request - message: - type: string - description: The error message - pattern: .+ - example: Bad Request. - code: - type: string - description: The error code - enum: - - Bad Request - example: Bad Request - errors: - type: array - items: - type: object - description: A client error detected by the server. - additionalProperties: true - failedValidations: - type: object - description: The validation errors in the client payload. - additionalProperties: true - required: - - statusCode - - error - - message - additionalProperties: false - "403": - description: Error returned when client is not authorized to access the - requested resource. - schema: - type: object - $id: todo.com - description: Error returned when client is not authorized to access the - requested resource. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 403 - example: 403 - error: - type: string - description: The error HTTP status description - enum: - - Forbidden - example: Forbidden - message: - type: string - description: The error message - pattern: .+ - example: Forbidden. - code: - type: string - description: The error code - enum: - - Forbidden - example: Forbidden - required: - - statusCode - - error - - message - additionalProperties: false - "404": - description: Error returned when the requested resource is not found. - schema: - type: object - $id: todo.com - description: Error returned when the requested resource is not found. - properties: - statusCode: - type: number - description: The error HTTP status code - enum: - - 404 - example: 404 - error: - type: string - description: The error HTTP status description - enum: - - Not Found - example: Not Found - message: - type: string - description: The error message - pattern: .+ - example: Not Found. - code: - type: string - description: The error code - enum: - - Not Found - example: Not Found - required: - - statusCode - - error - - message - additionalProperties: false - /v1/contest-series/: - get: - responses: - "200": - description: Default Response - schema: - type: array - items: - type: object - properties: - name: - type: string - contests: - type: array - items: - type: string - id: - type: string - domainId: - type: string - required: - - name - - contests - - id - - domainId diff --git a/packages/api-server/src/routes/v1/contest.routes.ts b/packages/api-server/src/routes/v1/contest.routes.ts index d0a0f14b..494573d2 100644 --- a/packages/api-server/src/routes/v1/contest.routes.ts +++ b/packages/api-server/src/routes/v1/contest.routes.ts @@ -12,7 +12,6 @@ import { TeamInvitationSchema, ProblemSchema } from '@argoncs/types' -import { fetchContestProblem } from '@argoncs/common' import { UnauthorizedError, badRequestSchema, @@ -20,7 +19,8 @@ import { forbiddenSchema, methodNotAllowedSchema, notFoundSchema, - unauthorizedSchema + unauthorizedSchema, + BadRequestError } from 'http-errors-enhanced' import { contestBegan, @@ -42,7 +42,8 @@ import { removeProblemFromContest, updateContest, publishContest, - fetchPublishedContests + fetchPublishedContests, + fetchContestProblem } from '../../services/contest.services.js' import { createTeam, @@ -55,12 +56,11 @@ import { makeTeamCaptain, removeTeamMember } from '../../services/team.services.js' -import { isTeamCaptain, isTeamMember } from '../../auth/team.auth.js' -import { createSubmission, querySubmissions } from '../../services/submission.services.js' +import { isTeamCaptain } from '../../auth/team.auth.js' +import { createSubmission, querySubmissions, rejudgeProblem } from '../../services/submission.services.js' import { hasVerifiedEmail } from '../../auth/email.auth.js' import { userAuthHook } from '../../hooks/authentication.hooks.js' import { contestInfoHook } from '../../hooks/contest.hooks.js' -import { requestUserProfile } from '../../utils/auth.utils.js' import { fetchUser } from '../../services/user.services.js' import { createPolygonUploadSession } from '../../services/testcase.services.js' @@ -165,9 +165,9 @@ async function contestProblemRoutes (problemRoutes: FastifyTypeBox): Promise { - if (request.user == null) { - throw new UnauthorizedError('User not logged in') - } + if (request.user == null) + throw new UnauthorizedError("not logged in"); + const submission = request.body const { contestId, problemId } = request.params const created = await createSubmission({ @@ -181,6 +181,32 @@ async function contestProblemRoutes (problemRoutes: FastifyTypeBox): Promise { + // @ts-ignore + const { problemId } = request.params; + const rejudges = await rejudgeProblem({ problemId }) + return await reply.status(202).send({ rejudges }) + } + ) + problemRoutes.get( '/polygon-upload-session', { diff --git a/packages/api-server/src/routes/v1/user.routes.ts b/packages/api-server/src/routes/v1/user.routes.ts index 6d3aa52b..7eb06504 100644 --- a/packages/api-server/src/routes/v1/user.routes.ts +++ b/packages/api-server/src/routes/v1/user.routes.ts @@ -7,12 +7,13 @@ import { NotFoundError, badRequestSchema, conflictSchema, forbiddenSchema, notFo import { completeTeamInvitation } from '../../services/team.services.js' import { hasDomainPrivilege } from '../../auth/scope.auth.js' import { isTeamMember } from '../../auth/team.auth.js' -import { fetchContestProblem, fetchSubmission } from '@argoncs/common' +import { fetchSubmission } from '@argoncs/common' import { isSuperAdmin } from '../../auth/role.auth.js' import { userAuthHook } from '../../hooks/authentication.hooks.js' import { submissionInfoHook } from '../../hooks/submission.hooks.js' import gravatarUrl from 'gravatar-url' import { querySubmissions } from '../../services/submission.services.js' +import {fetchContestProblem} from '../../services/contest.services.js' async function userProfileRoutes (profileRoutes: FastifyTypeBox): Promise { profileRoutes.get( diff --git a/packages/api-server/src/services/contest.services.ts b/packages/api-server/src/services/contest.services.ts index 0391df8c..f61af57b 100644 --- a/packages/api-server/src/services/contest.services.ts +++ b/packages/api-server/src/services/contest.services.ts @@ -1,5 +1,5 @@ import { MongoServerError, contestCollection, contestProblemCollection, contestProblemListCollection, mongoClient, ranklistRedis, recalculateTeamTotalScore, teamScoreCollection } from '@argoncs/common' -import { type ConetstProblemList, type Contest, type NewContest, type TeamScore } from '@argoncs/types' +import { Problem, type ConetstProblemList, type Contest, type NewContest, type TeamScore } from '@argoncs/types' import { ConflictError, MethodNotAllowedError, NotFoundError } from 'http-errors-enhanced' import { nanoid } from 'nanoid' import { CONTEST_CACHE_KEY, CONTEST_PATH_CACHE_KEY, PROBLEMLIST_CACHE_KEY, deleteCache, fetchCacheUntilLockAcquired, releaseLock, setCache } from '@argoncs/common' @@ -97,6 +97,14 @@ export async function publishContest ({ contestId, published }: { contestId: str await deleteCache({ key: `${CONTEST_CACHE_KEY}:${contest.id}` }) } +export async function fetchContestProblem ({ problemId }: { problemId: string }): Promise { + const problem = await contestProblemCollection.findOne({ id: problemId }) + if (problem == null) { + throw new NotFoundError('Problem not found') + } + return problem +} + export async function fetchContestProblemList ({ contestId }: { contestId: string }): Promise { const cache = await fetchCacheUntilLockAcquired({ key: `${PROBLEMLIST_CACHE_KEY}:${contestId}` }) if (cache != null) { @@ -161,7 +169,7 @@ export async function fetchContestRanklist ({ contestId }: { contestId: string } if (cache == null || (31536000 * 1000 - (await ranklistRedis.pttl(contestId)) > 1000 && (await ranklistRedis.getdel(`${contestId}-obsolete`)) != null)) { - const ranklist = await teamScoreCollection.find({ contestId }).sort({ totalScore: -1, lastTime: 1 }).toArray() + const ranklist = await teamScoreCollection.find({ contestId }).sort({ totalScore: -1, penalty: 1 }).toArray() await ranklistRedis.set(contestId, JSON.stringify(ranklist)) await ranklistRedis.expire(contestId, 31536000) // One year return ranklist diff --git a/packages/api-server/src/services/submission.services.ts b/packages/api-server/src/services/submission.services.ts index 5cbc3085..9b2e3d9f 100644 --- a/packages/api-server/src/services/submission.services.ts +++ b/packages/api-server/src/services/submission.services.ts @@ -6,23 +6,25 @@ import { type Submission, type Problem } from '@argoncs/types' /*=*/ -import { rabbitMQ, judgerExchange, judgerTasksKey, submissionCollection, fetchContestProblem } from '@argoncs/common' +import { rabbitMQ, judgerExchange, judgerTasksKey, submissionCollection } from '@argoncs/common' import { languageConfigs } from '../../configs/language.configs.js' import { nanoid } from 'nanoid' +import {fetchContestProblem} from './contest.services.js' export async function createSubmission ( { submission, userId, problemId, contestId, teamId = undefined }: { submission: NewSubmission, userId: string, problemId: string, contestId: string, teamId?: string }): Promise<{ submissionId: string }> { - const problem = await fetchContestProblem({ problemId }) + // Ensure problem exists + await fetchContestProblem({ problemId }) const submissionId = nanoid() let pendingSubmission: Submission = { ...submission, id: submissionId, status: SubmissionStatus.Compiling, - problemId: problem.id, + problemId, teamId, userId, contestId, @@ -89,3 +91,34 @@ export async function querySubmissions ({ query }: { query: { problemId?: string return submissions; } + +// returns the number of submissions to rejudge +export async function rejudgeProblem ({ problemId }: { problemId: string }): + Promise +{ + let rejudge = 0; + + for await (const submission of submissionCollection.find({ problemId })) { + rejudge ++; + + const { id, source, language } = submission; + + await submissionCollection.updateOne( + { id }, + { + $set: { status: SubmissionStatus.Compiling }, + $unset: { testcases: 1, penatly: 1, score: 1 } + }); + + const task: CompilingTask = { + submissionId: id, + type: JudgerTaskType.Compiling, + source, + language, + constraints: languageConfigs[language].constraints + } + rabbitMQ.publish(judgerExchange, judgerTasksKey, Buffer.from(JSON.stringify(task))) + } + + return rejudge +} diff --git a/packages/api-server/src/services/team.services.ts b/packages/api-server/src/services/team.services.ts index 5b93d893..a4602d20 100644 --- a/packages/api-server/src/services/team.services.ts +++ b/packages/api-server/src/services/team.services.ts @@ -31,7 +31,7 @@ export async function createTeam ({ newTeam, contestId, userId }: { newTeam: New await userCollection.updateOne({ id: userId }, { $set: { [`teams.${contestId}`]: id } }, { session }) - await teamScoreCollection.insertOne({ id, contestId, scores: {}, time: {}, lastTime: 0, totalScore: 0 }) + await teamScoreCollection.insertOne({ id, contestId, scores: {}, penalty: {}, time: {}, totalScore: 0, totalPenalty: 0}) }) } finally { await session.endSession() diff --git a/packages/common/src/index.ts b/packages/common/src/index.ts index 2dafe0f7..6ed4fa3f 100644 --- a/packages/common/src/index.ts +++ b/packages/common/src/index.ts @@ -7,6 +7,5 @@ export * from './connections/sentry.connections.js' export * from './utils/time.utils.js' export * from './services/cache.services.js' -export * from './services/problem.services.js' export * from './services/submission.services.js' export * from './services/team.services.js' diff --git a/packages/common/src/services/problem.services.ts b/packages/common/src/services/problem.services.ts deleted file mode 100644 index 7e37d364..00000000 --- a/packages/common/src/services/problem.services.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { type Problem } from '@argoncs/types' /*=*/ -import { NotFoundError } from 'http-errors-enhanced' -import { contestProblemCollection } from '../connections/mongodb.connections.js' - -export async function fetchContestProblem ({ problemId }: { problemId: string }): Promise { - const problem = await contestProblemCollection.findOne({ id: problemId }) - if (problem == null) { - throw new NotFoundError('Problem not found') - } - return problem -} diff --git a/packages/common/src/services/team.services.ts b/packages/common/src/services/team.services.ts index d5db3fb9..6870355c 100644 --- a/packages/common/src/services/team.services.ts +++ b/packages/common/src/services/team.services.ts @@ -8,34 +8,22 @@ export async function recalculateTeamTotalScore ({ contestId, teamId = undefined $match: query }, { - $project: { v: { $objectToArray: '$scores' } } + $project: { + s: { $objectToArray: '$scores' }, + p: { $objectToArray: '$penalties' }, + } }, { - $set: { totalScore: { $sum: '$v.v' } } + $set: { + totalScore: { $sum: '$s.v' }, + totalPenalty: { $sum: '$p.v' } + } }, { - $unset: "v" + $unset: ['s', 'p'] }, { $merge: { into: "teamScores" } } ]).toArray() - - await teamScoreCollection.aggregate([ - { - $match: query - }, - { - $project: { v: { $objectToArray: '$time' } } - }, - { - $set: { lastTime: { $max: '$v.v' } } - }, - { - $unset: "v" - }, - { - $merge: { into: "lastTime" } - } - ]).toArray() } diff --git a/packages/result-handler/src/services/result.services.ts b/packages/result-handler/src/services/result.services.ts index ff82c14b..0cf5fb05 100644 --- a/packages/result-handler/src/services/result.services.ts +++ b/packages/result-handler/src/services/result.services.ts @@ -1,6 +1,6 @@ -import { contestProblemCollection, fetchContestProblem, fetchSubmission, judgerExchange, judgerTasksKey, rabbitMQ, ranklistRedis, recalculateTeamTotalScore, submissionCollection, teamScoreCollection } from '@argoncs/common' +import { contestCollection, contestProblemCollection, fetchSubmission, judgerExchange, judgerTasksKey, rabbitMQ, ranklistRedis, recalculateTeamTotalScore, submissionCollection, teamScoreCollection } from '@argoncs/common' import { type CompilingResult, CompilingStatus, type GradingResult, GradingStatus, type GradingTask, JudgerTaskType, type Problem, SubmissionStatus, type CompilingCheckerResult } from '@argoncs/types' /*=*/ -import { NotFoundError } from 'http-errors-enhanced' +import {NotFoundError} from 'http-errors-enhanced'; import path from 'path' export async function handleCompileResult (compileResult: CompilingResult, submissionId: string): Promise { @@ -26,7 +26,9 @@ export async function handleCompileResult (compileResult: CompilingResult, submi const { problemId } = submission - let problem: Problem = await fetchContestProblem({ problemId }); + const problem = await contestProblemCollection.findOne({ problemId }); + if (problem === null) + throw new NotFoundError("problem does not exist"); if (problem.testcases == null) { await completeGrading(submissionId, 'Problem does not have testcases'); @@ -79,7 +81,10 @@ export async function handleCompileResult (compileResult: CompilingResult, submi export async function completeGrading (submissionId: string, log?: string): Promise { const submission = await fetchSubmission({ submissionId }) const { problemId, contestId, teamId, status, createdAt } = submission; - const { partials } = await fetchContestProblem({ problemId }) + const problem = await contestProblemCollection.findOne({ problemId }); + const contest = await contestCollection.findOne({ contestId }); + if (contest == null) throw new NotFoundError("contest does not exist") + if (problem == null) throw new NotFoundError("problem does not exist") // Unexpected status if (status !== SubmissionStatus.Compiling && @@ -99,32 +104,37 @@ export async function completeGrading (submissionId: string, log?: string): Prom // Calculate score // eslint-disable-next-line @typescript-eslint/restrict-plus-operands const passes = testcases.reduce((t, testcase) => t + (testcase.result!).status == GradingStatus.Accepted ? 1 : 0, 1); - const score = partials ? + const score = problem.partials ? passes / testcases.length * 100 : (passes == testcases.length ? 100 : 0); + const was = await submissionCollection.find({ problemId, teamId, score: { $ne: 100 }, createdAt: { $lt: createdAt } }).count(); + const penalty = score === 100 ? + was * 10 + (createdAt - contest.startTime) / 3600 : + 0; await submissionCollection.updateOne({ id: submissionId }, { $set: { score, + penalty, status: SubmissionStatus.Graded }, $unset: { gradedCases: '' } }) // Skip score update if testing submission - if (submission.contestId == null || submission.teamId == null) + if (contestId == null || teamId == null) return - const { modifiedCount } = await teamScoreCollection.updateOne({ contestId: submission.contestId, id: submission.teamId }, { - $max: { [`scores.${submission.problemId}`]: score } + const { modifiedCount } = await teamScoreCollection.updateOne({ contestId, id: teamId }, { + $max: { [`scores.${problemId}`]: score } }) // Only update if score increased if (modifiedCount > 0) { - await teamScoreCollection.updateOne({ contestId: submission.contestId, id: submission.teamId }, { - $max: { [`time.${submission.problemId}`]: submission.createdAt } + await teamScoreCollection.updateOne({ contestId, id: teamId }, { + $max: { [`time.${problemId}`]: createdAt }, + $set: { [`penalty.${problemId}`]: penalty } }) - const { contestId, teamId } = submission await recalculateTeamTotalScore({ contestId, teamId }) await ranklistRedis.set(`${submission.contestId}-obsolete`, 1) } @@ -133,27 +143,24 @@ export async function completeGrading (submissionId: string, log?: string): Prom export async function handleGradingResult (gradingResult: GradingResult, submissionId: string, testcaseIndex: number): Promise { const submission = await fetchSubmission({ submissionId }) - if (submission.status === SubmissionStatus.Grading) { - if (submission.testcases[testcaseIndex] == null) { - throw new NotFoundError('No testcase found at the given index') - } - submission.testcases[testcaseIndex].result = gradingResult - await submissionCollection.updateOne({ id: submissionId }, { - $set: { - [`testcases.${testcaseIndex}.result`]: gradingResult, - }, - $inc: { - gradedCases: 1, - } + if (submission.status !== SubmissionStatus.Grading) + return + + if (submission.testcases[testcaseIndex] == null) + throw new NotFoundError('No testcase found at the given index') + + submission.testcases[testcaseIndex].result = gradingResult + await submissionCollection.updateOne( + { id: submissionId }, + { + $set: { [`testcases.${testcaseIndex}.result`]: gradingResult }, + $inc: { gradedCases: 1 } }) - const updatedSubmission = await fetchSubmission({ submissionId }) - if (updatedSubmission.status === SubmissionStatus.Grading) { - if (updatedSubmission.gradedCases === updatedSubmission.testcases.length) { - await completeGrading(submissionId) - } - } - } + const updatedSubmission = await fetchSubmission({ submissionId }) + if (updatedSubmission.status === SubmissionStatus.Grading && + updatedSubmission.gradedCases === updatedSubmission.testcases.length) + await completeGrading(submissionId) } export async function handleCompileCheckerResult (result: CompilingCheckerResult, problemId: string): Promise { @@ -168,3 +175,4 @@ export async function handleCompileCheckerResult (result: CompilingCheckerResult console.log('checker compilation result recieved: ', checker); await contestProblemCollection.updateOne({ id: problemId }, { $set: { checker }}); } + diff --git a/packages/types/src/types/submission.types.ts b/packages/types/src/types/submission.types.ts index ea5a55e5..f8045992 100644 --- a/packages/types/src/types/submission.types.ts +++ b/packages/types/src/types/submission.types.ts @@ -56,6 +56,7 @@ const TerminatedSubmissionSchema = Type.Intersect([BaseSubmissionSchema, Type.Ob const GradedSubmissionSchema = Type.Intersect([BaseSubmissionSchema, Type.Object({ status: Type.Literal(SubmissionStatus.Graded), score: Type.Number(), + penalty: Type.Number(), testcases: Type.Array(Type.Object({ result: GradingResultSchema })) diff --git a/packages/types/src/types/team.types.ts b/packages/types/src/types/team.types.ts index dc054666..7f3b49a7 100644 --- a/packages/types/src/types/team.types.ts +++ b/packages/types/src/types/team.types.ts @@ -32,8 +32,9 @@ export const TeamScoreSchema = Type.Object({ id: Type.String(), contestId: Type.String(), scores: Type.Record(Type.String(), Type.Number()), + penalty: Type.Record(Type.String(), Type.Number()), time: Type.Record(Type.String(), Type.Number()), totalScore: Type.Number(), - lastTime: Type.Number() + totalPenalty: Type.Number(), }) export type TeamScore = Static