You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "/Users/aleksandarmilosevic/Desktop/invoke.http/venv/lib/python3.11/site-packages/nipyapi/registry/models/extension_bundle.py", line 382, in bundle_type
raise ValueError(
ValueError: Invalid value for `bundle_type` (nifi-nar), must be one of ['NIFI_NAR', 'MINIFI_CPP']
What I Did
This is the actual definition in the nifi-registry-core:
Changing the extension bundle bundle_type solves the issue:
@bundle_type.setterdefbundle_type(self, bundle_type):
""" Sets the bundle_type of this ExtensionBundle. The type of the extension bundle :param bundle_type: The bundle_type of this ExtensionBundle. :type: str """ifbundle_typeisNone:
raiseValueError("Invalid value for `bundle_type`, must not be `None`")
# was allowed_values = ["NIFI_NAR", "MINIFI_CPP"]allowed_values= ["nifi-nar", "minifi-cpp"]
ifbundle_typenotinallowed_values:
raiseValueError(
"Invalid value for `bundle_type` ({0}), must be one of {1}"
.format(bundle_type, allowed_values)
)
self._bundle_type=bundle_type
Urgency
Not urgent, but a good fix for a CI/CD that my I am implementing.
I can open a PR to handle this if needed, so far I was fine with monkey patching
Although the documentation on the NiFi registry API is a bit misguiding as well, there is no mention of the actual values for the enum.
The text was updated successfully, but these errors were encountered:
Hi @duhizjame this comes up occasionally string literals in the NiFi swagger spec - it was never originally written to be used to generate a client like this, so we sometimes run into these conversion issues.
The model code is templated here
I note in the swagger def that it is canonically CAPS.
I have a memory that this should not be all caps from a previous bug like this, we could check in with the NiFi dev community for an opinion?
Thanks for the fast response! @Chaffelson
I joined the slack channel, so I'll monitor if there is any progress as well. Until then, monkey patching will do the job 😄
Description
Right now the call:
is throwing an exception:
What I Did
This is the actual definition in the nifi-registry-core:
Changing the extension bundle bundle_type solves the issue:
Urgency
Not urgent, but a good fix for a CI/CD that my I am implementing.
I can open a PR to handle this if needed, so far I was fine with monkey patching
Although the documentation on the NiFi registry API is a bit misguiding as well, there is no mention of the actual values for the enum.
The text was updated successfully, but these errors were encountered: