-
Notifications
You must be signed in to change notification settings - Fork 1
Return 'averageTestScore' property in TraineeEducationInfo #282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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
averageTestScorevirtual property toTraineeEducationInfoSchemausing the existingcalculateAverageTestScoreutility function - Configured
TraineeEducationInfoSchemato include virtual properties in JSON output - Updated the OpenAPI specification to document the new
averageTestScoreproperty inTraineeEducationInfo - 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.
There was a problem hiding this 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.
There was a problem hiding this 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.
Affects the response of GET /trainees/{id}