Skip to content

Conversation

@nycomp
Copy link
Contributor

@nycomp nycomp commented Feb 9, 2026

Summary

Auth Service OpenAPI Spec

Documents all endpoints:

  • /users - CRUD operations, activate
  • /logins - Create login session with email/password
  • /sessions/{provider} - OAuth session creation (Google, Microsoft)
  • /clients - OAuth client registration
  • /credentials/{provider}/{user_id} - CRUD for credentials
  • /vaults/{label}/{key} - Vault key management
  • /root/authenticate - Internal service authentication

Error response schemas include:

  • Campus error envelope format
  • OAuth-specific details in details.oauth_error
  • WWW-Authenticate header for 401 responses

Reference: auth-error-spec.md

API Service OpenAPI Spec

Documents all endpoints:

  • /assignments - CRUD operations, classroom links
  • /circles - CRUD operations, member management (add, remove, update access)
  • /submissions - CRUD operations, response/feedback management, grade updates
  • /emailotp - Request and verify OTP

Error response schemas follow Campus envelope format with field-level validation errors.

🤖 Generated with Claude Code

ngjunsiang and others added 4 commits February 9, 2026 19:21
- Add comprehensive OpenAPI 3.0.3 spec for auth service
  - Documents all endpoints: /users, /logins, /sessions, /clients, /credentials, /vaults, /root/authenticate
  - Includes error response schemas with Campus envelope format
  - WWW-Authenticate header for 401 responses

- Update API OpenAPI spec with all endpoints
  - /assignments: CRUD operations, classroom links
  - /circles: CRUD operations, member management
  - /submissions: CRUD operations, grade updates
  - /emailotp: request and verify OTP

- Error response schemas follow Campus envelope format with OAuth details in nested dict

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix duplicate 'credentials' key in auth OpenAPI spec (credential + credentials)
- Fix duplicate /circles/{circle_id}/members path in API OpenAPI spec
  (combined GET and PATCH under single path definition)
- Remove nested 'responses:' block from API schemas (non-standard)
- Restore auth-error-spec.md from git history (was incorrectly removed)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add openapi-spec-validator to dev dependencies
- Fix API OpenAPI spec:
  - Convert nullable types from JSON Schema array syntax to OpenAPI 3.0 nullable: true
  - Move response objects from components.schemas to components.responses
  - Fix response reference names (Unauthorized -> UnauthorizedResponse, etc.)
- Add unit tests for OpenAPI spec validation in tests/unit/common/test_openapi_spec.py
  - Tests validate YAML syntax and OpenAPI 3.0.3 compliance
  - Focus on structural validity to minimize maintenance
- Update TESTING-GUIDE.md with OpenAPI validation commands

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@ngjunsiang ngjunsiang linked an issue Feb 10, 2026 that may be closed by this pull request
@ngjunsiang
Copy link
Contributor

Fix #31

@nycomp nycomp merged commit a4df230 into weekly Feb 10, 2026
4 checks passed
@nycomp nycomp deleted the 31-openapi-schema branch February 10, 2026 02:24
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.

OpenAPI schema

2 participants