Skip to content

Commit 635bb4e

Browse files
Fix bullet point line prefer-skip-optional-pointer-with-omitzero typo in README.md (oapi-codegen#2028)
Fix bulletpoint line `prefer-skip-optional-pointer-with-omitzero` typo - reference back to `prefer-skip-optional-pointer` Co-authored-by: Jamie Tanna <github@jamietanna.co.uk>
1 parent 13eea66 commit 635bb4e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3837,10 +3837,10 @@ One of the key things `oapi-codegen` does is to use an "optional pointer", follo
38373837

38383838
This can be tuned on a per-field basis, using the [`x-go-type-skip-optional-pointer` extension](#ext-x-go-type-skip-optional-pointer), but it can be a bit repetitive, or can be more complex when using an OpenAPI Overlay.
38393839

3840-
As of `oapi-codegen` v2.5.0, this can be tuned in two specific ways, via the following Output Options:
3840+
As of `oapi-codegen` v2.5.0, this can be tuned in two specific ways, via the following `output-options:`:
38413841

38423842
- `prefer-skip-optional-pointer`: a global default that you do _not_ want the "optional pointer" generated. Optional fields will not have an "optional pointer", and will have an `omitempty` JSON tag
3843-
- `prefer-skip-optional-pointer-with-omitzero`: when used in conjunction with `prefer-skip-optional-pointer-with-omitzero`, any optional fields are generated with an `omitzero` JSON tag. **Requires Go 1.24+**
3843+
- `prefer-skip-optional-pointer-with-omitzero`: when used in conjunction with `prefer-skip-optional-pointer`, any optional fields are generated with an `omitzero` JSON tag. **Requires Go 1.24+**
38443844

38453845
In both cases, there is control on a per-field level to set `x-go-type-skip-optional-pointer: false` or `x-omitzero: false` to undo these to field(s).
38463846

0 commit comments

Comments
 (0)