swaggo / gin-swagger

gin middleware to automatically generate RESTful API documentation with Swagger 2.0.
MIT License
3.66k stars 266 forks source link

unknown field 'LeftDelim' in struct literal of type... #267

Open lynn447742 opened 1 year ago

lynn447742 commented 1 year ago

After upgrading swag to the latest version, run swag init, and report the following error after running the program:

docs/docs.go:3338:2: unknown field 'LeftDelim' in struct literal of type "github.com/swaggo/swag".Spec docs/docs.go:3339:2: unknown field 'RightDelim' in struct literal of type "github.com/swaggo/swag".Spec

The relevant codes for docs/docs.go:3338-3339 are as follows: // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = &swag.Spec{ ... LeftDelim: "{{", RightDelim: "}}", }

qsoyq commented 1 year ago

https://github.com/swaggo/swag/issues/1568

JXDS18FUJT commented 10 months ago

me too,I need to delete it every time before generated docs/docs.go,i hope to find why generated two field