rledisez 44ad6d5eac [go-server] Support min/max/defaults for values (#15185)
* [go-server] Support min/max/defaults for values

Enforce, for the go-server, to check the minimum and maximum values
specified in the openapi description. Also apply the default if the
parameter is not passed.

Fix #14013

* Fix merge conflict

Co-authored-by: Ween Jiann <16207788+lwj5@users.noreply.github.com>

* Improve UnmarshalJSON implementation

Co-authored-by: Ween Jiann <16207788+lwj5@users.noreply.github.com>

* Improve default value handling for string

Co-authored-by: Ween Jiann <16207788+lwj5@users.noreply.github.com>

* Fix suggested changes

* rework option pattern

* add imports based on types/min max values

---------

Co-authored-by: Ween Jiann <16207788+lwj5@users.noreply.github.com>
2023-05-17 01:58:28 +08:00

14 lines
459 B
Modula-2

module github.com/OpenAPITools/openapi-generator/samples/client/petstore/go
replace github.com/OpenAPITools/openapi-generator/samples/client/petstore/go/go-petstore => ./go-petstore
go 1.13
require (
github.com/OpenAPITools/openapi-generator/samples/client/petstore/go/go-petstore v0.0.0-00010101000000-000000000000
github.com/go-openapi/swag v0.22.3
github.com/stretchr/testify v1.8.1
golang.org/x/net v0.2.0 // indirect
golang.org/x/oauth2 v0.2.0
)