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

Flexible AdditionalProperties #65

Merged
merged 1 commit into from
Apr 26, 2018

Conversation

brandur-stripe
Copy link
Contributor

Previously, we only ever had the boolean use of AdditionalProperties,
in that a false was used to specify that no additional properties were
allowed.

As of more recent versions of the spec, we're now using the schema
format for it as well, and this causes the YAML parser to error as it
encounters a value that's not compatible with the bool that we had
specified before.

This patch changes AdditionalProperties to take an interface{} so
that either type can be accepted. This won't be workable if we actually
need a value for AdditionalProperties, but we're not using this
property at the moment, so it's fine for now.

Previously, we only ever had the boolean use of `AdditionalProperties`,
in that a `false` was used to specify that no additional properties were
allowed.

As of more recent versions of the spec, we're now using the schema
format for it as well, and this causes the YAML parser to error as it
encounters a value that's not compatible with the `bool` that we had
specified before.

This patch changes `AdditionalProperties` to take an `interface{}` so
that either type can be accepted. This won't be workable if we actually
need a value for `AdditionalProperties`, but we're not using this
property at the moment, so it's fine for now.
@brandur-stripe brandur-stripe merged commit 4362e10 into master Apr 26, 2018
@brandur-stripe brandur-stripe deleted the brandur-flexible-additional-properties branch April 26, 2018 01:27
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.

2 participants