Skip to content

Automated OpenAPI specification generation #330

Description

@natkam

Is your feature request related to a problem? Please describe.
Adding or changing an endpoint requires manual updates to the OpenAPI schema (grader_api.yml, schemas.yml, etc.). It is tedious, and we often forget to do that.

Describe the solution you'd like
Automated generation of the schema based on the code/docstrings.

Maybe also doing it automatically in a pre-commit hook?

Describe alternatives you've considered

  • FastAPI generates OpenAPI specs automatically.
  • There may be some libraries that generate the schema based on the handlers' docstrings, but this basically requires writing the yaml in the docstring, so it seems to only be a bit better.
  • Reportedly, it should be possible to generate the specs based on Postman collections; maybe Bruno also allows that?

(Note for self:
Add schemas for the new roles and users handlers.)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions