Skip to content

LicensingApi.get_counted_feature_stats always returns None #4

Closed

Description

@njferrant

Issue:

The licensing api method get_counted_feature_stats has two issues:

  1. The method always returns None. This is due to a 200 OK response code coming back from API endpoint instead of the 202 Accepted response expected by the method. Its of note that the Controllers (v6.0 build 14216) swagger API spec doesn't document a 200 response, (which would explain why the openapi-generator didn't include it in the code).

  2. The 200 OK response data doesn't fully match the AsyncOperationResponse schema - it's missing a result_url field. This causes a validation error if the response data is assigned to the AsyncOperationResponse class.

Steps to Reproduce:

iimport cyperf
from cyperf.models.async_operation_response import AsyncOperationResponse
from cyperf.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = cyperf.Configuration(
    host = "https://url_here",
    username="user",
    password="pass",
    refresh_token=None
)
configuration.verify_ssl = False

with cyperf.ApiClient(configuration) as api_client:
    api_instance = cyperf.LicensingApi(api_client)
    try:
        api_response = api_instance.get_counted_feature_stats()
        print("The response of LicensingApi->get_counted_feature_stats:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling LicensingApi->get_counted_feature_stats: %s\n" % e)

Versions:

  • CyPerf Controller: v6.0 build 14216
  • cyperf-api-wrapper: commit c8e07832bf2befa4f3c1b179a422c0bfb3f2d69c

Activity

  1. linked a pull request that will close this issueBug fixes for multiple issues #6on Sep 22, 2025
  2. tsimionescu commented on Sep 22, 2025

    @tsimionescu
    Collaborator

    Thank you for reporting this! It should be fixed in the latest build available in PyPI, and in the latest code here. We added support for the 200 OK response as an option in the generated code here, and made the result_url field optional, as it should have been.

    Unfortunately we can't address the issues in the OpenAPI spec served by CyPerf Controller v6.0, but we will make sure that future releases of CyPerf controller will include the right information in the API spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions