[Go] fix issues with required object parameters marked omitempty#4682
[Go] fix issues with required object parameters marked omitempty#4682wing328 merged 2 commits intoswagger-api:masterfrom vvalchev:issue_4665
omitempty#4682Conversation
|
@vvalchev thanks for the PR and thinking about adding a test case. I would suggest creating a file "pet_test.go" similar to https://github.com/swagger-api/swagger-codegen/blob/master/samples/client/petstore/go/pet_api_test.go to test the Pet model. Let me know if you need any help. |
|
@vvalchev also, please run |
Please note, that there are quite few changes, that doesn’t come from the diff I’ve applied. Seems the script wasn’t run on the previous commit.
|
I've run the script and committed the changed files. But few of the changes are not because of the diff, I've applied. Still I was able to compile the generated client successfully. Sorry for the test, probably somebody else can contribute one. |
@vvalchev No problem at all. |
|
@vvalchev the change looks good. Thanks for your contribution. |
omitempty
…ed omitempty. (swagger-api#4682) * Fixed issue swagger-api#4665 [go] required object parameters are marked omitempty. * Run ./bin/go-petstore.sh as suggested by @wing328. Please note, that there are quite few changes, that doesn’t come from the diff I’ve applied. Seems the script wasn’t run on the previous commit.
Description of the PR
Details are included in the issue.
I tried to create a test, but it would take inadequate amount of time to understand how codegen works internally and how to deal with mustache. Sorry.