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

[Feature Request] OpenAPI with API to typescript lift #2972

Open
2 of 3 tasks
CKY- opened this issue Jan 14, 2025 · 0 comments
Open
2 of 3 tasks

[Feature Request] OpenAPI with API to typescript lift #2972

CKY- opened this issue Jan 14, 2025 · 0 comments
Assignees
Labels
Dev Approved The issue has been approved by a team member and can be worked on. Enhancement A feature request or improvement

Comments

@CKY-
Copy link
Collaborator

CKY- commented Jan 14, 2025

Describe the solution you'd like
Enter a clear and concise description of what you want to happen.

Proposal

In order to facilitate documentation we need a standard to follow the OpenAPI 3.0 standard seems to be the industry's adopted standard. The open API standard uses JSDoc comment schemes, to export a Json file that can then be used to generate documentation pages. Provided that the JSDoc is updated on addition or edit of new or existing endpoints this will ease development workload over time. There will be no need to update the external files of the website and the docs page.

This is not an excuse to over document the code base or to over document functions within the code base all code should still be legible readable and concise without documentation. however using the JSDoc method of OpenAPI in source can inform other development tools (such as Swagger, postman or IntelliSense), further improving the developer experience

This can be facilitated in 3 sections

  • a loader using swagger-Jsdoc run time in the GitHub workflow
  • adding JSDoc to each endpoint describing in detail all parameters, queries, and body data for the request and all responses with samples including error messages as prescribed by the OpenAPI standard.
  • a way to move/publish the the generated file to the gocs page to be parsed and displayed.

This is not a lift to be moved to v6 in contrast v6 will have a completely different endpoint set

Scope

The scope of work will touch all of the API controllers moving them to Loosely typed typescript from JavaScript, I will try to stay within the confines of the controllers unless loose typing is not available. then i will fix the typing for that import and strongly type the controller.

The V1router will have the bulk of the changes adding JSDoc definitions all endpoints.

Each of the JSdoc definitions will be created from the corresponding controller.

There are still some of the files that the controllers import that are not typescript and will need to be handled at a later date

This lift will facilitate the loader and JsDocs for the endpoint the moving of the doc file to the document page will be done later

Additional context
Add any other context or screenshots about the feature request here.

Tasks

Preview Give feedback
@CKY- CKY- added the Enhancement A feature request or improvement label Jan 14, 2025
@github-project-automation github-project-automation bot moved this to Todo in Firebot Jan 14, 2025
@CaveMobster CaveMobster added the Dev Approved The issue has been approved by a team member and can be worked on. label Jan 17, 2025
@CKY- CKY- self-assigned this Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dev Approved The issue has been approved by a team member and can be worked on. Enhancement A feature request or improvement
Projects
Status: Todo
Development

No branches or pull requests

2 participants