Skip to content

feat(api): Implement dfr-spectacular for OpenAPI spec generation#1378

Draft
66Bunz wants to merge 9 commits intoFuzzyGrim:feat/add-apifrom
66Bunz:feat/add-api
Draft

feat(api): Implement dfr-spectacular for OpenAPI spec generation#1378
66Bunz wants to merge 9 commits intoFuzzyGrim:feat/add-apifrom
66Bunz:feat/add-api

Conversation

@66Bunz
Copy link
Copy Markdown
Contributor

@66Bunz 66Bunz commented Apr 25, 2026

No description provided.

…-spectacular and update API authentication methods

Co-authored-by: Copilot <copilot@github.com>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request integrates drf-spectacular for automated OpenAPI schema generation, adding a dedicated management command, documentation instructions, and configurable schema/UI endpoints. Feedback suggests using settings.BASE_DIR for more robust path resolution in the management command and referencing the project's VERSION constant in the configuration to ensure consistency.

Comment thread src/api/management/commands/generate_openapi.py Outdated
Comment thread src/config/settings.py Outdated
SPECTACULAR_SETTINGS = {
"TITLE": "Yamtrack API",
"DESCRIPTION": "OpenAPI schema for Yamtrack's API",
"VERSION": "0.0.25",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The version string is hardcoded here, but a VERSION constant is already defined on line 348 (retrieved from environment variables). Using the existing constant ensures that the OpenAPI documentation stays in sync with the application version.

Suggested change
"VERSION": "0.0.25",
"VERSION": VERSION,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe when the API will be stable, not now

66Bunz and others added 8 commits April 26, 2026 00:40
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
…ar spec generation

Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
…o endpoints

Co-authored-by: Copilot <copilot@github.com>
…istics endpoints

Co-authored-by: Copilot <copilot@github.com>
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.

1 participant