* If a form param is an array and isn't caught in the previous checks, treat it as a slice of strings.
* Add an example of a FormParam that is an array
* Add support for DateTime objects in the Path, Query Params, and as a List
* Fix indentation
* Add an exaple that has dateTimes
Move the date parsing into a common util in the routers.go file.
* Fix compilation issue and regen
* Use the `RequiredError` to handle this case
* Only split on a "," and not an extra 'space' after the ",".
* Support for an endpoint returning a file to a client.
* Spaces to tabs conversion
* Add an example endpoint for download a file
* Regenerate after merging main
* Add support for Enums to be part of the Path and Query
Supports optional Query Enums and Lists of Enums as well
Add an example endpoint that covers the added scenarios
Added an import mapping for the GoServerCodegen for "fmt"
when a model is an enum.
Expanded the Enum Model for the Go Server to have validation.
Copied this logic from the Go Client Enum Model.
* Fix identation of examples
* Pre-allocate the capacity of the slice of Enums to be
the correct size.
* Formatting and updated examples
* Empty-Commit
* Switch to using a map to store the valid enum values
* Fixed pointer derefs missed from previous change in PR
* More fixing of pointer to not pointer
* Create a map for validation and a list of enums for messaging
* [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>
* Add apiNameSuffix to AbstractGoCodegen
* Regenerate files
* Update tests
* Regenerate files
* Update test files
* Regenerate for CI test
* Regenerate for CI test
* Remove some docs
* Add files back
* [go] More idiomatic godoc comments
* [go] Mark deprecated fields and functions
* [go] Minor mustache readability/consistency fixes
* [go] Mark deprecated operation parameters
* [go] Deprecate a petstore component property for testing
* [go] Apply deprecated godoc in Go servers also
* Added int arrays parsing in parameters. Respect the 'required' property.
* Replaced spaces with tabs
* Generate samples with new spacing
* Removed unused import
* Merged with latest master
* Add bool query in example
* Add parseBoolParameter
* test with boolean parameter
* add endpiont for testing boolean
* remove bool parameter test
Co-authored-by: Stéphane Guillemot <gmtstephane@gmail.com>
Update the go server api controller template to return the Router interface instead of the api specific router.
The Router interface type has the Routes function, which is what the generated `NewRouter` function needs. (not the api specific interface).
* Enhance go api server with interfaces router binding and services
Enhance the default go api server generation to define interfaces for an API's routes and services. Handle an endpoint's http binding in the generated router and the skeleton for the service logic in an API service.
* Include interface documentation in Go Server generation.