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

Ignore @openapi/@swagger jsdoc #227

Open
pedro-mass opened this issue Feb 14, 2024 · 0 comments
Open

Ignore @openapi/@swagger jsdoc #227

pedro-mass opened this issue Feb 14, 2024 · 0 comments

Comments

@pedro-mass
Copy link

For API documentation, I'm making use of this: https://github.com/Surnet/swagger-jsdoc

For this to work, it needs to follow certain formats:

  • @openapi/@Swagger tag needs to be on it's own line
  • rest of definition is in yaml

When I run the prettier-plugin-jsdoc it breaks the requirements swagger-jsdoc needs.

Things I've tried:

  • ignore my router files (ref)
    • while it did stop the HTTP method from wrapping up a line, the path keeps wrapping up to the @openapi tag
      • which breaks swagger-jsdoc parsing
  • switch to single asterisk (/* */) instead of double (/** */) (ref)
    • this breaks due to swagger-jsdoc only parsing double asterisk

Is there a way to have both? Good jsdoc formatting, but leave the API doc comments alone?

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

No branches or pull requests

1 participant