ogen-go / ogen

OpenAPI v3 code generator for go
https://ogen.dev
Apache License 2.0
1.46k stars 86 forks source link

Bug during generation: error message expected ';', found 'if' #1327

Closed yawnak closed 1 month ago

yawnak commented 1 month ago

What version of ogen are you using?

$ go list -m github.com/ogen-go/ogen

github.com/ogen-go/ogen v1.4.1

Can this issue be reproduced with the latest version?

YES

What did you do?

Tried to generate code from schema

Command: //go:generate go run github.com/ogen-go/ogen/cmd/ogen@latest --target petstore petstore.yml

Link to schema on google drive: LINK

What did you expect to see?

I expected generated code without errors

What did you see instead?

Error after generate

INFO convenient Convenient errors are not available {"reason": "operation has no \"default\" response", "at": "petstore.yml:15:9"} generate: main.run /home/yawnak/go/pkg/mod/github.com/ogen-go/ogen@v1.4.1/cmd/ogen/main.go:379

yawnak commented 1 month ago

https://github.com/ogen-go/ogen/pull/1328 here is a PR with fix for this issue

yawnak commented 1 month ago

fix was merged, closing