Skip to content

Conversation

@olistrik
Copy link

@olistrik olistrik commented Feb 9, 2024

I noticed that if you use JSONSchemaExtend to set the description of a nested struct, it would be overwritten by the lookup of jsonschema_description on the parent field even if that tag was not provided.

This change makes sure that the tag is actually set, even if it's empty, and only overwrites the description if that is so. This allows the parent to override or remove the description if it wishes.

@samlown samlown added the needs tests Not enough tests for this to be accepted label Feb 19, 2024
@samlown
Copy link
Contributor

samlown commented Feb 19, 2024

Sounds good, and I know this is tiny, but some tests to make sure it doesn't break again would be great! Thanks.

@olistrik
Copy link
Author

@samlown sure! I'll add some.

@olistrik
Copy link
Author

@samlown done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs tests Not enough tests for this to be accepted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants