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

Generate a schema containing specific field with "additionalProperties": true #1958

Open
huaqing1994 opened this issue Jan 8, 2025 · 1 comment

Comments

@huaqing1994
Copy link

Can I generate a schema like

"objectType": {
    "type": "object",
    "properties": {
        "field1": {
            "additionalProperties": true
        },
        "field2": {
            "additionalProperties": true
        }
    }
}

by swaggo from a golang struct ?

@sdghchj
Copy link
Member

sdghchj commented Jan 9, 2025

type objectType struct{
field1 map[string]interface{}
field2 map[string]interface{}
}

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

No branches or pull requests

2 participants