Skip to content
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

Use DapNET API definition as "single source of truth" #9

Open
3 tasks
Trayshar opened this issue Jan 17, 2023 · 0 comments
Open
3 tasks

Use DapNET API definition as "single source of truth" #9

Trayshar opened this issue Jan 17, 2023 · 0 comments
Labels
cleanup Remove unnecessary code or refactor code to be easier to maintain documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed

Comments

@Trayshar
Copy link
Collaborator

Trayshar commented Jan 17, 2023

Use dapnet-core/api-docs as "single source of truth". All routes, data definitions and validation rules are to be generated automatically from them.

Reasoning: The API surface of this project is rather large and especially the validation rules for input forms are complex. Managing this complexity on the server, the client(s) and the API document is unpromising and will lead to poor maintainability.

  • API routes: Replace src/api/api_routes.ts with auto-generated code, see openapi-typescript for a potential solution.
  • Form validation: Find a way to convert OpenAPI validation rules into Quasar validation rules.
  • Update the API to actually match our backend... or vice-versa
@Trayshar Trayshar added enhancement New feature or request cleanup Remove unnecessary code or refactor code to be easier to maintain labels Jan 17, 2023
@Trayshar Trayshar changed the title Generate backend routes from API doc Use DapNET API definition as "single source of truth" Jan 19, 2023
@Trayshar Trayshar added documentation Improvements or additions to documentation help wanted Extra attention is needed labels Jan 19, 2023
@Trayshar Trayshar pinned this issue Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Remove unnecessary code or refactor code to be easier to maintain documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant