Closed kelf closed 11 months ago
We need to be able to ingest values like 0. If make the parameter a pointer and tag it required we get the following output
0
required
/v1/foo/{fooId}: get: ... - name: fooId in: path required: true schema: type: string nullable: true ...
As you can see, fooId is both nullable and required.
https://pkg.go.dev/github.com/go-playground/validator/v10#hdr-Required states;For slices, maps, pointers, interfaces, channels and functions ensures the value is not nil. For structs ensures value is not the zero value when using WithRequiredStructEnabled.
For slices, maps, pointers, interfaces, channels and functions ensures the value is not nil. For structs ensures value is not the zero value when using WithRequiredStructEnabled.
Any thoughts on how to correct the output so the param is not marked nullable?
nullable
Won't do
We need to be able to ingest values like
0
. If make the parameter a pointer and tag itrequired
we get the following outputAs you can see, fooId is both nullable and required.
https://pkg.go.dev/github.com/go-playground/validator/v10#hdr-Required states;
For slices, maps, pointers, interfaces, channels and functions ensures the value is not nil. For structs ensures value is not the zero value when using WithRequiredStructEnabled.
Any thoughts on how to correct the output so the param is not marked
nullable
?