Skip to content

feat: Add class "section" return #76

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AveTravolta
Copy link

@AveTravolta AveTravolta commented Aug 14, 2025

Description

This pull request adds a section field to the course class objects in the API. The purpose is to include class section information in the JSON response for each course, allowing users to see which specific section a class belongs to when querying /courses/{course_cid}. This improves the clarity and usability of the course data returned by the API.

Changes Made

  • Updated schemas.py to include the section field in ClassSchema.
  • Updated server.py to populate and return the section field for each class.
  • Verified database connectivity to local.sqlite3 and confirmed valid course IDs for testing.
  • Tested endpoints using FastAPI Swagger UI and PowerShell Invoke-RestMethod to confirm the new field appears correctly in responses.

Related Issues

Fixes #73

Additional Notes

No changes to existing database structure were needed; this is purely a schema and response update.
Screen1
Screen2
Screen3

@phoenixpereira phoenixpereira added the enhancement New feature or request label Aug 16, 2025
@phoenixpereira phoenixpereira moved this to In Progress in Courses API Aug 16, 2025
@phoenixpereira phoenixpereira changed the title Added class "section" return feat: Add class "section" return Aug 16, 2025
@phoenixpereira
Copy link
Member

@AveTravolta Can you please run uv run ruff format to fix the formatting issues.

@phoenixpereira phoenixpereira self-requested a review August 16, 2025 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

[Feature Request] Return Class Section
2 participants