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

Respect required fields in {target,} schema #7

Merged
merged 2 commits into from
May 1, 2024

Conversation

Nymphium
Copy link

@Nymphium Nymphium commented Apr 30, 2024

depends #6

現在schea toplevelのrequiredにあるフィールドのみrequired判定される。
これにより、意図せずomitemptyがついたフィールドのあるstructが生成されてしまう。
本PRでは、request/responseのstruct生成時に、links[*].schema.requiredおよびlinks[*].targetSchema.requiredを参照してomitempty属性をつけるかどうかを判定する。

Copy link

@michiomochi michiomochi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

@Nymphium
Copy link
Author

Nymphium commented May 1, 2024

TY 🙏

@Nymphium Nymphium merged commit 7acc606 into regenerate May 1, 2024
2 checks passed
@Nymphium Nymphium deleted the respect-required-schema branch May 13, 2024 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants