Skip to content

Skip ContextValidate when the field is nil avoiding a panic fixing #2911 #2927

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

Merged
merged 2 commits into from
Apr 26, 2023

Conversation

romainbou
Copy link
Contributor

@romainbou romainbou commented Apr 23, 2023

Fixes issue #2911

  • a4b8a2d modifies the model template to add the swag.IsZero condition.
  • 90c671d adds a small test verifying that the added condition is indeed in the resulting code

…tion

Signed-off-by: Romain Bouyé <romain@bouye.fr>
…generated code

Signed-off-by: Romain Bouyé <romain@bouye.fr>
@romainbou romainbou force-pushed the 2911-fix-context-validator branch from 1e844ae to 90c671d Compare April 23, 2023 16:32
@romainbou romainbou changed the title Skip ContextValidate when the field is nil avoiding a panic finxing #2911 Skip ContextValidate when the field is nil avoiding a panic fixing #2911 Apr 26, 2023
@casualjim casualjim merged commit 0dbada3 into go-swagger:master Apr 26, 2023
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