[Go-Server] Add support for DateTime Query Parameters#16749
[Go-Server] Add support for DateTime Query Parameters#16749wing328 merged 8 commits intoOpenAPITools:masterfrom
Conversation
|
Hi @icubbon Thank you for the PR. As there are currently no cases with DateTime in the generation sample, it is difficult to see how the generated files will look. Would you be able to add a new route or add a datetime field somewhere in https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/test/resources/3_0/go-server/petstore.yaml then regenerate the code for go-server. Let us know if you need any help with generation |
Move the date parsing into a common util in the routers.go file.
Good call with the example! An import for |
| } | ||
|
|
||
| func parseTimes(param string) ([]time.Time, error) { | ||
| splits := strings.Split(param, ", ") |
There was a problem hiding this comment.
| splits := strings.Split(param, ", ") | |
| splits := strings.Split(param, ",") |
Dont require a space
|
Will need your help to resolve the conflict before we can merge |
…on/openapi-generator into go-server/bugFixes/dateTimeSupport
|
Conflicts resolved, looks like the generated examples have both the Enum changes and the DateTime changes as well. |
Add support to the Go-Server template to parse DateTime parameters in the Query and as a List in the Query.
PR checklist
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*.For Windows users, please run the script in Git BASH.
master(upcoming 7.1.0 minor release - breaking changes with fallbacks),8.0.x(breaking changes without fallbacks)@lwj5 @wing328