Commit 44ddba3
Improve logic for x-omitempty (oapi-codegen#1033)
Currently x-omitempty only enables you to force the _absences_ of `omitempty`. This PR changes the logic so that the existance of `x-omitempty` will force omit empty to be whatever the user specifies.
The logic around omit empty is pretty confusing here though. For example, why is omitEmpty excluded by default if it's nullable (e.g. if `p.Nullable` then `omitEmpty = false`).1 parent 50c4e3e commit 44ddba3
1 file changed
Lines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
638 | 638 | | |
639 | 639 | | |
640 | 640 | | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
641 | 645 | | |
642 | | - | |
643 | | - | |
644 | | - | |
645 | | - | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
646 | 649 | | |
647 | 650 | | |
648 | 651 | | |
649 | 652 | | |
650 | 653 | | |
651 | | - | |
| 654 | + | |
652 | 655 | | |
653 | 656 | | |
654 | 657 | | |
| |||
0 commit comments