diff --git a/hathor/cli/openapi_files/register.py b/hathor/cli/openapi_files/register.py index 3e531f97d..84e67309d 100644 --- a/hathor/cli/openapi_files/register.py +++ b/hathor/cli/openapi_files/register.py @@ -34,6 +34,7 @@ def register_resource(resource_class: ResourceClass) -> ResourceClass: def get_registered_resources() -> list[type[Resource]]: """ Returns a list with all the resources registered for the docs """ + import hathor.feature_activation.resources.feature # noqa: 401 import hathor.p2p.resources # noqa: 401 import hathor.profiler.resources # noqa: 401 import hathor.stratum.resources # noqa: 401 diff --git a/hathor/feature_activation/resources/feature.py b/hathor/feature_activation/resources/feature.py index 58c8070b4..f580e818f 100644 --- a/hathor/feature_activation/resources/feature.py +++ b/hathor/feature_activation/resources/feature.py @@ -160,7 +160,23 @@ class GetFeaturesResponse(Response): FeatureResource.openapi = { '/feature': { - 'x-visibility': 'private', + 'x-visibility': 'public', + 'x-rate-limit': { + 'global': [ + { + 'rate': '50r/s', + 'burst': 100, + 'delay': 50 + } + ], + 'per-ip': [ + { + 'rate': '3r/s', + 'burst': 10, + 'delay': 3 + } + ] + }, 'get': { 'operationId': 'feature', 'summary': 'Feature Activation',