Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Delegate type reverse lookup for formats #58

Open
fredbi opened this issue Jan 2, 2018 · 0 comments
Open

Delegate type reverse lookup for formats #58

fredbi opened this issue Jan 2, 2018 · 0 comments

Comments

@fredbi
Copy link
Member

fredbi commented Jan 2, 2018

In type.go, function schemaInfoForType() is essentially a reverse lookup of the format registry.

Currently, there some types missing from the default registry published by go-openapi/strfmt.

PR #60 added support for "mac" (following report from go-swagger/go-swagger#1348), but some remain missing:
Formats:
[ ] TODO: missing password
[ ] TODO: missing binary

Overall, keeping this reverse lookup in sync with strfmt is a real chore. Unit testing is not very useful either.

I suggest such type reverse lookup function to be handed over to strfmt.
Custom formats could bring their own mapping too.

Any thought?

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant