Skip to content

openapi3gen: Always use SetSchema if type implements SetSchemar interface. #1077

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

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

Conversation

tprouza
Copy link

@tprouza tprouza commented Jun 14, 2025

The documentation for SetSchemar indicates that when a type implements this interface, the generator will use it. However, this does not occur, except for type Kinds not handled by the switch cases, such as Array (covered by tests as [16]byte). Anyone implementing SetSchemar clearly intends for it to be used, especially for struct, which is often wrappers around some primitive value.

@fenollp
Copy link
Collaborator

fenollp commented Jun 15, 2025

Hey, thanks for this. Please add a regression test that ensures the behavior.

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.

2 participants