-
Notifications
You must be signed in to change notification settings - Fork 218
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
Documentation generator? #251
Comments
Can you be more specific about this issue? What exactly is the input and expected output? |
Hi,
Before I discovered Voluptuous I wrote a simple parameter validation
layer myself which is far less capable and I'd like to move over to
Voluptuous but the one feature it doesn't have is doc generation.
See here: https://dev.dogstarcloud.com/docs/
This page was created (mostly) automatically - the parameter
specifications are captured and the HTML is generated with some simple
code. It seems like it would be possible to do something similar with
Voluptuous, I'd do it myself but it would probably be much quicker if
someone with prior knowledge of the code base did it. What do you think?
Thanks,
Charlie.
On Thu, Dec 1, 2016, at 03:36 PM, Tushar Makkar wrote:
Can you be more specific about this issue? What exactly is the input
and expected output?
— You are receiving this because you authored the thread. Reply to
this email directly, view it on GitHub[1], or mute the thread[2].
|
Hey @cskilbeck I lost this conversation somehow. Sorry for that. Ohh.. You mean that schema is converted to HTML format, which will enhance its accessibility. You can start off with writing a separate file for documentation generation which can use templating engine like Jinja2, which takes in input as a schema and yields out HTML content for the same. I can help you off with the integration bit for it. Thanks |
No response, closing. |
Sad this issue has been closed :'( A generated documentation would definitely be a killer feature for a library like voluptuous. We currently have an API and define data validation thanks to voluptuous. Exposing the schema to potential consumers of our API would be awesome. |
bump.. Much needed |
@romgar wanna go for it? |
I won't have enough time for it unfortunately. |
Here's a project that aims to do that: https://github.com/balloob/voluptuous-serialize. It may make sense to develop such a project outside of the |
Not sure if this addresses the issue, but I wrote something simple that makes it possible to document schemas with sphinx: class User(Model):
username: str = Length(max=20) #: The username
bio: str = Any(None, Length(max=500)) #: The user's background information (optional).
u = User(username="me", bio="I'm from Timbuktu")
print(u.username)
print(u["bio"]) Sphinx understands the |
It would be really useful to have a function which outputs some structured data which describes the schema, this could then be converted into HTML or whatever.
The text was updated successfully, but these errors were encountered: