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

Writing jsdoc in YAML is very difficult with comments #21

Closed
dilipkumar2k6 opened this issue May 31, 2016 · 7 comments
Closed

Writing jsdoc in YAML is very difficult with comments #21

dilipkumar2k6 opened this issue May 31, 2016 · 7 comments

Comments

@dilipkumar2k6
Copy link

I liked this module however when I tried to use it for my API then it became nightmare as its very difficult to hand code JSDoc in YAML style. Very tough to write valid YAML syntax inside the comments.

Can I used any other comment format?

@chdanielmueller
Copy link
Member

Hi @dilipkumar2k6

What format would you prefer to describe the spec with?
I think to write JSON in JSDoc is not very handy to read and it looks a bit missplaced in the documentation.

I am keen to hear about your opinion on this.

  • Daniel

@dilipkumar2k6
Copy link
Author

I would prefer to use pure JSDoc if possible. Writing yaml in comments is very difficult. I found following module useful in terms of writing the docs however quality of generated swagger.yaml is not good.
https://github.com/fsbahman/apidoc-swagger

Still not able to make decision to choose the better approach.

@fyodorvi
Copy link

fyodorvi commented Jun 8, 2016

@dilipkumar2k6 apidoc-swagger is super buggy, quite useless

If you look at source code you'll see that the guy hardcoded 200 for every response.

@chdanielmueller
Copy link
Member

Hi @dilipkumar2k6,

As you said by yourself https://github.com/fsbahman/apidoc-swagger uses another approach in documenting the swagger documentation.
It is not the purpose of this package to support all kinds of documentation styles, but one way in a good working manner.

I hope you can decide on one or the other package.

Regards,
Daniel

@dietergeerts
Copy link

dietergeerts commented Nov 8, 2018

The way to write the swagger docs as yaml inside jsdoc is really not useful, it's hard to maintain, hard to read etc.... I would prefer to use something like apidoc-swagger, but better, where you also can use normal jsdoc typedefs as return types etc... as otherwise, you end up documenting everything twice now....

@kalinchernev
Copy link
Contributor

Since 1.9.0 you can use external files to which are included in your specification.

@410063005
Copy link

master...410063005:swagger-jsdoc:master

I modified a little in the fork. It works well without the '*'. A late reply to an old issuse.

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

6 participants