-
Notifications
You must be signed in to change notification settings - Fork 54
fix: Switch from ARM Template params to JSON Schema params #660
fix: Switch from ARM Template params to JSON Schema params #660
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with the only comment about returning a float when coercing for an integer.
c8a550a
to
6c98a65
Compare
Updated with a pointer to the explanation here. |
Note that this is going to be a breaking change for downstream tooling, which parses the bundle's |
Oh! Good catch @itowlson ! |
6c98a65
to
7d8b81f
Compare
As this also touches on Thanks! |
MaxLength *int `json:"maxLength,omitempty" mapstructure:"maxLength,omitempty"` | ||
Pattern string `json:"pattern,omitempty" mapstructure:"pattern,omitempty"` | ||
Enum []interface{} `json:"enum,omitempty" mapstructure:"enum,omitempty"` | ||
Metadata ParameterMetadata `json:"metadata,omitempty" mapstructure:"metadata,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should Metadata
be Description
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the parameter definition from the spec:
metadata
: Holds fields that are not used in validation (OPTIONAL)description
: A user-friendly description of the parameter
And it's the same here.
This is outdated. |
Switch to JSON Schema's keywords for validators, add pattern validator and exclusive[Min|Max] validators.
Also, refactored the tests to (a) increase coverage, and (b) reduce boilerplate.
Closes #648