Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix global overrides for any/interface ref types #1835

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ezequiel
Copy link

@ezequiel ezequiel commented Jun 25, 2024

Closes #1834

Description

When overriding with any or interface{}, the code should prefer the "any" (empty) schema instead, not the object schema since that's different e.g.

.swaggo

replace json.RawMessage any

model.go

type Thing struct {
	data json.RawMessage `json:"data"`
}

Output

"model.Thing": {
	"type": "object",
	"properties": {
	  "data": {}
	}
}

Test Plan

make all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Global override any type uses incorrect schema
1 participant