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

anonymous struct from additionalproperties is inconvenient #343

Open
aep opened this issue Dec 21, 2021 · 0 comments
Open

anonymous struct from additionalproperties is inconvenient #343

aep opened this issue Dec 21, 2021 · 0 comments

Comments

@aep
Copy link

aep commented Dec 21, 2021

this schema

properties:
  foo:
    type: object
       additionalproperties:
         type: object
         properties:
           ID:
             type: string

generates an anonymous struct

type VmhYamlFoo map[string]struct {
   ID string
}

for large objects this is very inconvenient since you need to redefine the struct each time you want to set that property.
i think it would be better if the struct was a named type

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

1 participant