ogen-go / ogen

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

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

Open yawnak opened 2 hours ago

yawnak commented 2 hours 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 2 hours ago

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