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

Marshaling schemas with additionalProperties back from openapi3.T has extra fields #164

Closed
praneetloke opened this issue Mar 10, 2024 · 1 comment · Fixed by #166
Closed

Comments

@praneetloke
Copy link
Member

praneetloke commented Mar 10, 2024

An object with additionalProperties in the original open API doc that looks like this:

...
autoApprovers:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
...

turns into this when a doc loaded from that is serialized back into YAML:

...
autoApprovers:
          type: object
          additionalProperties:
            has: null
            schema:
                type: array
                items:
                    type: string
...

Looks like kin-api needs a handler to marshal/unmarshal YAML similar to how it does with JSON. This causes validation of such schemas to fail because the has and the schema property under the additionalProperties object are treated as unknown "extras".

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