Closed ezequiel closed 3 months ago
When specifying any as a global override in .swaggo, it seems to override with the object shema instead of the any schema
any
.swaggo
replace json.RawMessage any
type Thing struct { data json.RawMessage `json:"data"` }
"model.Thing": { "type": "object", "properties": { "data": {} } }
"model.Thing": { "type": "object", "properties": { "data": { "type": "object" } } }
e.g. v1.16.3
e.g. v1.22.4
Issue seems to stem from:
https://github.com/swaggo/swag/blob/7204462ba422fd428d50e3ae7641e3c475a63183/operation.go#L845-L846
We can probably use &spec.Schema{} here instead?
&spec.Schema{}
Description
When specifying
any
as a global override in.swaggo
, it seems to override with the object shema instead of the any schemaTo Reproduce
.swaggo
model.go
Expected behavior
Actual behavior
Your swag version
e.g. v1.16.3
Your go version
e.g. v1.22.4