Skip to content

Conversation

@stasel
Copy link
Member

@stasel stasel commented Jan 30, 2026

Affects the response of GET /trainees/{id}

Copilot AI review requested due to automatic review settings January 30, 2026 20:55
@HackYourFutures HackYourFutures temporarily deployed to dojo-backend-return-avg-79gjbx January 30, 2026 20:55 Inactive
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds a computed averageTestScore property to the TraineeEducationInfo schema, making it available in the response of the GET /trainees/{id} endpoint. The average is calculated from test scores using an existing utility function that selects the highest score for each test type. Additionally, the PR includes formatting improvements to consistently quote HTTP status codes in the OpenAPI specification.

Changes:

  • Added averageTestScore virtual property to TraineeEducationInfoSchema using the existing calculateAverageTestScore utility function
  • Configured TraineeEducationInfoSchema to include virtual properties in JSON output
  • Updated the OpenAPI specification to document the new averageTestScore property in TraineeEducationInfo
  • Standardized HTTP status code formatting in the API specification (unquoted to quoted)

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
server/src/schemas/TraineeSchema.ts Added import for calculateAverageTestScore, created virtual property for averageTestScore on TraineeEducationInfoSchema, and configured JSON serialization to include virtuals
server/api.yaml Added averageTestScore property to TraineeEducationInfo schema definition and standardized HTTP status code formatting throughout the specification

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants