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

Required statement management in case of complex structure (allOf ) #505

Open
LasneF opened this issue May 31, 2024 · 0 comments
Open

Required statement management in case of complex structure (allOf ) #505

LasneF opened this issue May 31, 2024 · 0 comments

Comments

@LasneF
Copy link

LasneF commented May 31, 2024

given a structure as below

  Cat:
      description: myNiceCat
      type: object
      required:
        - nice
      allOf:
        - $ref: '#/components/schemas/animal'
        - properties:
            nice :
              type: boolean

vaccum return an error | object contains required fields but no properties | oas-schema-check |
providing the line containing nice

tips from the boss himself @daveshanley

looks it s around there
https://github.com/daveshanley/vacuum/blob/main/functions/openapi/schema_type.go#L261
needs to be altered to look at polymorphic props as well as root props.

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