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

Consider listing Model Schema / Example Value #48

Open
gnidan opened this issue Jan 12, 2016 · 4 comments
Open

Consider listing Model Schema / Example Value #48

gnidan opened this issue Jan 12, 2016 · 4 comments

Comments

@gnidan
Copy link

gnidan commented Jan 12, 2016

It would be nice to have bootprint output the swagger-ui-style Model Schema, which provides something of an example value as documentation (original discussion at #29 (comment))

@gnidan
Copy link
Author

gnidan commented Jan 13, 2016

Just to followup, I did a bit of digging around for this, and it appears the behavior does come from swagger-js and not swagger-ui. The method appears to be called createJSONSample, defined at https://github.com/swagger-api/swagger-js/blob/master/lib/types/model.js#L23

@gnidan
Copy link
Author

gnidan commented Jan 13, 2016

Oh, but this project doesn't seem to use swagger-js at all? I guess that changes the extent to which I can look into this :)

@nknapp
Copy link
Member

nknapp commented Jan 13, 2016

No currently, I don't. I started off with a simple Handlebars template and everything else grew around it.

I have no problem including new libraries, but I always try to keep bootprint-swagger small (although it may not seem to). Looking at the dependency tree, swagger-js (aka. swagger-client) adds a couple of dependencies that will increase this size by a few megabytes and it is already to large.

On the other hand, the code is under apache license (a good part of the code seems to be at https://github.com/swagger-api/swagger-js/blob/master/lib/schema-markup.js#L100 btw. It does seem to be pretty straight forward. Maybe it is not that hard to reimplement. This should be done in a separate module however, so that other people can use it too.

I don't know if I find time to do this. But I would certainly be in for a code-review.

@gnidan
Copy link
Author

gnidan commented Jan 13, 2016

I also may or may not be able to find the time to do this. My team lead mentioned he would set up tooling so that I can concentrate on writing our spec; I will propose this to him and see if together we can find bandwidth to implement something.

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

2 participants