You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2327,7 +2327,7 @@ However, you lose the ability to understand the three cases, as there's no way t
2327
2327
- is this field `null`? (Can be checked with `S.Field == nil`)
2328
2328
- does this field have a value? (`S.Field != nil && *S.Field == "123"`)
2329
2329
2330
-
As of `oapi-codegen`[v2.1.0](https://github.com/oapi-codegen/oapi-codegen/releases/tag/v2.1.0) it is now possible to represent this with the `nullable.Nullable` type from [our new library, oapi-codegen/nullable](https://github.com/oapi-codegen/nullable).
2330
+
As of `oapi-codegen`[v2.1.0](https://github.com/oapi-codegen/oapi-codegen/releases/tag/v2.1.0) it is now possible to represent this with the `nullable.Value` type from [our library, oapi-codegen/nullable](https://github.com/oapi-codegen/nullable). (previously `nullable.Nullable`, now deprecated);
2331
2331
2332
2332
If you configure your generator's Output Options to opt-in to this behaviour, as so:
2333
2333
@@ -2341,7 +2341,7 @@ You will now receive the following output:
2341
2341
```go
2342
2342
type S struct {
2343
2343
// note that there's no pointer here, just `omitempty`
2344
-
Field nullable.Nullable[string] `json:"field,omitempty"`
2344
+
Field nullable.Value[string] `json:"field,omitempty"`
0 commit comments