-
Notifications
You must be signed in to change notification settings - Fork 72
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
Document support for description #25
Comments
Yes you can simply do: from marshmallow import fields, Schema
from marshmallow_jsonschema import JSONSchema
class MySchema(Schema):
myfield = fields.String(metadata={'description': 'hi there'}, required=True)
JSONSchema().dump(MySchema()).data
> {'properties': {'myfield': {'description': 'hi there',
'title': 'myfield',
'type': 'string'}},
'required': ['myfield'],
'type': 'object'} Let me know if that works for you and I'll add it to the documentation at some point |
fuhrysteve
changed the title
Support for description?
Document support for description\
May 23, 2017
fuhrysteve
changed the title
Document support for description\
Document support for description
May 23, 2017
LukeMarlin
pushed a commit
to LukeMarlin/marshmallow-jsonschema
that referenced
this issue
Oct 29, 2019
I assumed this was the case, but had to come here to verify. It would be good to add it to the docs. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sorry, this is a question, rather than an issue, but is there support for jsonschema's per-field "description" property?
The text was updated successfully, but these errors were encountered: