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

add DEFAULT_FORMATS['uuid'] in formatter.py #374

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kedrrr
Copy link

@kedrrr kedrrr commented Mar 5, 2020

No description provided.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.0004%) to 99.165% when pulling 9f0de79 on kedrrr:master into 2079240 on Yelp:master.

Copy link
Contributor

@sjaensch sjaensch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have a travis failure; please run make install-hooks locally to see and fix the issue.

format='byte',
to_wire=lambda u: str(u) if isinstance(u, uuid.UUID) else u,
to_python=lambda s: s if isinstance(s, uuid.UUID) else uuid.UUID(s),
validate=NO_OP, # jsonschema validates uuid
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think JSONSchema does validate UUID, does it?
I'm also hesitant to add a default format to bravado-core that is not defined in the OpenAPI specification. If we do add it, could you please mention it in the documentation as well?

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

Successfully merging this pull request may close these issues.

3 participants