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

Implementing TextMarshaler overrides my Schema #64

Closed
uberbrodt opened this issue Dec 8, 2022 · 1 comment · Fixed by #72
Closed

Implementing TextMarshaler overrides my Schema #64

uberbrodt opened this issue Dec 8, 2022 · 1 comment · Fixed by #72

Comments

@uberbrodt
Copy link

Hi, I noticed that when I implement TextMarshaler on a type, the schema that I set through a Preparer interface is ignored. Looks like it gets picked up by isWellKnownType in reflect.go before PrepareJSONSchema is called.

I'd like some way similar to what was done here, #62 but to make sure it's type is not overridden because it implements TextMarshaler.

@vearutop
Copy link
Member

You're right, TextMarshaler is a fair indicator to add type string, but it definitely should not prevent further processing.

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 a pull request may close this issue.

2 participants