-
Notifications
You must be signed in to change notification settings - Fork 206
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
How to define object parameters with complex validation #1459
Comments
Thanks for bringing this to our attention @cy-ddg . Your approach above looks sound. This definitely appears to be a bug in Porter. |
We can close this once the cnab-go fix (or similar) is integrated into Porter. |
I can confirm that this issue is fixed as of ed52bc1 on the v1 branch. |
I am working on getting a build out of our v1 prerelease so that people can try this out. I'm going to close this issue since we have a fix merged, and will send out an announcement when I have a v1 build ready for people to try out. Make sure to join our mailing list or slack to know when a build is ready to test. |
This has been fixed in the v1.0.0-alpha.2 prerelease. Please give it a try and let us know if you run into any problems! |
The new version looks very good! The example above is working now. I've found one more problem though when trying to define an array parameter with a specific schema for the items: parameters:
- name: values
type: array
items:
type: integer This builds successfully but trying to install it with the following parameters: {
"parameters": [
{
"name": "values",
"source": {
"value": "[]"
}
}
]
} I get the following error message:
But besides that it is working pretty well. Good job! |
I am trying to define parameters that use the full power of the available JSONSchema validations available in the CNAB spec, but so far I have only middling success.
The following parameter definition
builds successfully but trying to set the parameter value on install like this
results in this error on running the install command:
A parameter definition like
does not even build and fails with the error:
So my question is this: Am I doing something wrong or is this a limitation of the current implementation?
The text was updated successfully, but these errors were encountered: