prettier-plugin-jsdoc icon indicating copy to clipboard operation
prettier-plugin-jsdoc copied to clipboard

Ignore @openapi/@swagger jsdoc

Open pedro-mass opened this issue 1 year ago • 0 comments

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?

pedro-mass avatar Feb 14 '24 20:02 pedro-mass