Skip to content

Add comprehensive OpenAPI 3.0 documentation for the API#1

Draft
Copilot wants to merge 7 commits intomainfrom
copilot/document-api-with-openapi
Draft

Add comprehensive OpenAPI 3.0 documentation for the API#1
Copilot wants to merge 7 commits intomainfrom
copilot/document-api-with-openapi

Conversation

Copy link

Copilot AI commented Oct 19, 2025

This PR adds complete OpenAPI 3.0 documentation for the Home Access Center API, making it easy for developers to understand and integrate with all available endpoints.

📚 What's Added

OpenAPI Specification (openapi.yaml)

A complete OpenAPI 3.0.3 specification documenting all 13 endpoints:

Student Information

  • GET /api/name - Retrieve student's full name
  • GET /api/info - Get detailed student profile (grade, school, DOB, counselor, etc.)

Classes & Grades

  • GET /api/classes - List all enrolled classes
  • GET /api/averages - Current grade averages
  • GET /api/assignments - Detailed assignment information with grades
  • GET /api/weightings - Grade category weightings
  • GET /api/gradebook - Complete gradebook (combines averages, assignments, and weightings)

Reports

  • GET /api/reportcard - Official report cards
  • GET /api/ipr - Interim progress reports
  • GET /api/transcript - Full academic transcript with GPA
  • GET /api/rank - Class rank and quartile information

The specification includes:

  • Complete request/response schemas with examples
  • All query parameters (user, pass, link, short, six_weeks, no_cache)
  • Proper error responses (401 Unauthorized, 500 Internal Server Error)
  • Server configurations for both production and local development
  • Organized tags and descriptions for easy navigation

Interactive Documentation (docs.html)

A beautiful, standalone HTML documentation page that works offline without external CDN dependencies. Features:

  • Clean, modern UI with proper styling
  • Organized by endpoint categories
  • Usage examples with curl commands
  • Cache information and tips
  • Links to OpenAPI spec and external tools

API Documentation

Documentation Guide (API_DOCUMENTATION.md)

Comprehensive guide covering:

  • How to view documentation locally
  • Integration with popular tools (Swagger Editor, Postman, Insomnia, VS Code, Redocly)
  • Quick start examples
  • Contributing guidelines for maintaining documentation

Enhanced README

Updated README.md with:

  • API documentation section with links to all resources
  • Complete endpoint listing organized by category
  • Query parameters documentation
  • Usage examples

🎯 Benefits

  1. Developer Experience: Developers can now understand all available endpoints at a glance
  2. Tool Integration: Import openapi.yaml into Postman, Insomnia, or Swagger for instant API collections
  3. Standards Compliance: Following OpenAPI 3.0.3 standard ensures compatibility with the ecosystem
  4. Quick Reference: docs.html provides immediate access to formatted documentation
  5. Maintainability: Clear structure makes it easy to update documentation as the API evolves

✅ Validation

  • OpenAPI specification validated with swagger-cli
  • All endpoints from source code verified present in documentation ✓
  • HTML documentation tested and renders correctly ✓
  • No build artifacts or temporary files committed ✓

🚀 How to Use

Quick View:

# Open HTML documentation in browser
open docs.html

With Swagger Editor:

  1. Visit editor.swagger.io
  2. Import openapi.yaml
  3. View interactive documentation and test endpoints

With Postman/Insomnia:

  1. Import openapi.yaml
  2. All endpoints automatically added as a collection

With Redocly:

npm install -g @redocly/cli
redocly preview-docs openapi.yaml

Closes issue requesting OpenAPI documentation for the API.

Original prompt

document this api with openapi


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits October 19, 2025 19:14
Co-authored-by: Packjackisback <83289186+Packjackisback@users.noreply.github.com>
Co-authored-by: Packjackisback <83289186+Packjackisback@users.noreply.github.com>
Copilot AI changed the title [WIP] Document API with OpenAPI specifications Add comprehensive OpenAPI 3.0 documentation for the API Oct 19, 2025
Copilot AI requested a review from Packjackisback October 19, 2025 19:17
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.

2 participants