-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add GET contents-quality API #448
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: develop
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 PR adds a new GET endpoint /api/v1/analytics/contents-quality that allows administrators to query content quality scores for posts. The API supports two query modes: retrieving scores for specific content IDs, or filtering by quality levels (excellent, good, fair, weak, broken) with pagination support.
Key Changes:
- New endpoint supporting quality score queries with scores ranging from 1-5
- Support for both direct content ID lookups and quality level filtering
- Pagination support when using quality level filters
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| v1/analytics/response.yaml | Defines the 200 response schema including data structure, pagination, and two example scenarios |
| v1/analytics/parameter.yaml | Adds query parameters: contentIds, contentsType, levels, and contentsQualityLimit |
| v1/analytics/index.yaml | Defines the new contents-quality endpoint with operation details and security requirements |
| swagger.yaml | Registers the new endpoint path in the main API specification |
| bundled.json | Contains the bundled OpenAPI specification with all endpoint definitions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| type: array | ||
| items: | ||
| type: object | ||
| required: [contentId, contentType, qualityScore, qualityReason, userId, contentCreatedAt, processedAt, model, networkId] |
Copilot
AI
Oct 21, 2025
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.
The schema marks qualityReason and model as required fields in the response, but these fields are not defined in the properties section and are missing from all example responses. Either remove them from the required array or add their definitions to the properties.
| example: "post.text" | ||
| qualityScore: | ||
| type: number | ||
| description: Quality score from 1-5 |
Copilot
AI
Oct 21, 2025
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.
The qualityScore allows decimal values (example: 4.5) but the quality level descriptions in the endpoint documentation suggest integer boundaries (score >= 5, 4 <= score < 5, etc.). Clarify whether scores are integers or decimals, and update the documentation or constraints accordingly.
| description: Quality score from 1-5 | |
| description: Quality score from 1.0 to 5.0 (inclusive). Can be a decimal value such as 4.5. |
No description provided.