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

Enhance API Documentation with Swagger #5

Open
Somya2010 opened this issue Jan 25, 2025 · 0 comments · May be fixed by #34
Open

Enhance API Documentation with Swagger #5

Somya2010 opened this issue Jan 25, 2025 · 0 comments · May be fixed by #34
Labels
documentation Improvements or additions to documentation IWOC2025 Medium

Comments

@Somya2010
Copy link
Member

Description

Add Swagger API documentation to provide an interactive and easy-to-understand interface for the API.

Steps to Implement

  1. Install swagger-ui-express and swagger-jsdoc.
  2. Define API endpoint documentation in JSDoc format using Swagger specifications.
  3. Serve the Swagger UI at /api-docs.

Expected Outcome

Interactive API documentation that helps developers understand and test the API.

Resources

@Durgesh4993 Durgesh4993 added documentation Improvements or additions to documentation Medium IWOC2025 labels Jan 25, 2025
yashksaini-coder added a commit to yashksaini-coder/expressify that referenced this issue Feb 16, 2025
Fixes DEVRhylme-Foundation#5

Add Swagger API documentation to the project.

* **internal/structure/structure.go**
  - Add a new function `AddSwaggerDocs` to set up Swagger documentation.
  - Call `AddSwaggerDocs` in `CreateBaseFileStructure` after copying the directory.

* **.templates/jsbase/src/app.js**
  - Import `swagger-ui-express` and `swagger-jsdoc`.
  - Define Swagger documentation in JSDoc format.
  - Set up Swagger UI to serve at `/api-docs`.

* **.templates/tsbase/src/app.ts**
  - Import `swagger-ui-express` and `swagger-jsdoc`.
  - Define Swagger documentation in JSDoc format.
  - Set up Swagger UI to serve at `/api-docs`.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/DEVRhylme-Foundation/expressify/issues/5?shareId=XXXX-XXXX-XXXX-XXXX).
@yashksaini-coder yashksaini-coder linked a pull request Feb 16, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation IWOC2025 Medium
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants