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

Question: x-enumNames is not used to display possible string enum values for documentation? #94

Open
krunalm opened this issue Aug 23, 2017 · 1 comment

Comments

@krunalm
Copy link

krunalm commented Aug 23, 2017

Hi,

I have a swagger spec file which have below enum:

"Status": {
"type": "integer",
"description": "",
"x-enumNames": [
"Archived",
"Deleted"
],
"enum": [
1,
2,
]
},

I've generated html documentation using bootprint but i think it is not using "x-enumNames" values to display better enum documentation. The swagger-ui does use this and displays proper string values. I would like to use bootprint as I find it easy, simple to use.

Please let me know if there is a way to do so.

Thanks for great tool!

@krunalm krunalm changed the title Question: x-enumNames is used to display enum values in strings in documentation? Question: x-enumNames is not used to display possible string enum values for documentation? Aug 23, 2017
@nknapp
Copy link
Member

nknapp commented Aug 23, 2017

Is "x-enumNames" specified anywhere? It looks like a custom enhancement, and I did not know about it until now.

The part is rendered in the "datatype.hbs"-partial of bootprint-json-schema.

If you want to make a PR to that file, I'll merge it. It would also be great to have a complete but minimal swagger-spec that uses this features, so that I can write a test.

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