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
I am using the OpenAPI specification provided by OpenZiti for the OpenZiti Controller. It appears that the OpenAPI spec is not aligned with the actual behavior of the OpenZiti Controller. Specifically, the roles attribute defined under .definitions.roles in the OpenAPI spec is not marked as nullable.
However, the OpenZiti Controllers' API returns null for the roles property (e.g. EdgeRouterPolicyDetail Model, specifically properties edge_router_roles & identity_roles) when querying router or service policies that do not have roles attached.
This discrepancy leads to an issue in my autogenerated client implementation (based on the OpenAPI spec), as the code attempts to validate the model data returned by the OpenZiti Controller. The returned object contains a null value for the roles attribute, causing validation errors.
Steps to Reproduce:
Use the OpenAPI spec to generate a client for the OpenZiti Controller using the openapi-generator-cli.
Create a service policy or router policy without specifying attributes or identities using the ZAC.
Perform a GET request on the API to query a router or service policies.
Observe that the roles attribute in the response is null.
Expected Behavior: The controller should return an empty array instead of null for the roles property. Alternatively, the roles attribute can be marked as nullable in the OpenAPI spec to align with the actual behavior of the OpenZiti Controller.
Actual Behavior: The roles attribute is not marked as nullable in the OpenAPI spec, leading to validation errors in the autogenerated client when the roles attribute is null.
Hi there :)
I am using the OpenAPI specification provided by OpenZiti for the OpenZiti Controller. It appears that the OpenAPI spec is not aligned with the actual behavior of the OpenZiti Controller. Specifically, the roles attribute defined under .definitions.roles in the OpenAPI spec is not marked as nullable.
However, the OpenZiti Controllers' API returns null for the roles property (e.g. EdgeRouterPolicyDetail Model, specifically properties edge_router_roles & identity_roles) when querying router or service policies that do not have roles attached.
This discrepancy leads to an issue in my autogenerated client implementation (based on the OpenAPI spec), as the code attempts to validate the model data returned by the OpenZiti Controller. The returned object contains a null value for the roles attribute, causing validation errors.
Steps to Reproduce:
Use the OpenAPI spec to generate a client for the OpenZiti Controller using the openapi-generator-cli.
Create a service policy or router policy without specifying attributes or identities using the ZAC.
Perform a GET request on the API to query a router or service policies.
Observe that the roles attribute in the response is null.
Expected Behavior: The controller should return an empty array instead of null for the roles property. Alternatively, the roles attribute can be marked as nullable in the OpenAPI spec to align with the actual behavior of the OpenZiti Controller.
Actual Behavior: The roles attribute is not marked as nullable in the OpenAPI spec, leading to validation errors in the autogenerated client when the roles attribute is null.
Environment:
OpenZiti Controller version: 1.1.5 (additionally tested with version 1.1.15)
OpenAPI spec version: v0.26.20
Client code generator: openapi-generator-cli 7.10.0
Autogenerated client language: python
The text was updated successfully, but these errors were encountered: