Skip to content
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

/openapi/ endpoint broken in v1.5.18 #3209

Closed
zodac opened this issue Jul 9, 2024 · 1 comment
Closed

/openapi/ endpoint broken in v1.5.18 #3209

zodac opened this issue Jul 9, 2024 · 1 comment

Comments

@zodac
Copy link
Contributor

zodac commented Jul 9, 2024

Tandoor Version

1.5.18

Setup

Docker / Docker-Compose

Reverse Proxy

Apache2

Other

No response

Bug description

I just updated to 1.5.18, and when I try and view the /openapi/ endpoint, I get the following error:

AssertionError
`inflection` must be installed for OpenAPI schema support.

I was using this endpoint as a healthcheck URL, but it also fails to load in the browser.

Relevant logs

ERROR:django.request:Internal Server Error: /openapi/
Traceback (most recent call last):
  File "/opt/recipes/venv/lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/recipes/venv/lib/python3.12/site-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/recipes/venv/lib/python3.12/site-packages/django/views/decorators/csrf.py", line 56, in wrapper_view
    return view_func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/recipes/venv/lib/python3.12/site-packages/django/views/generic/base.py", line 104, in view
    return self.dispatch(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/recipes/venv/lib/python3.12/site-packages/rest_framework/views.py", line 509, in dispatch
    response = self.handle_exception(exc)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/recipes/venv/lib/python3.12/site-packages/rest_framework/schemas/views.py", line 48, in handle_exception
    return super().handle_exception(exc)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/recipes/venv/lib/python3.12/site-packages/rest_framework/views.py", line 469, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/opt/recipes/venv/lib/python3.12/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
    raise exc
  File "/opt/recipes/venv/lib/python3.12/site-packages/rest_framework/views.py", line 506, in dispatch
    response = handler(request, *args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/recipes/venv/lib/python3.12/site-packages/rest_framework/schemas/views.py", line 37, in get
    schema = self.schema_generator.get_schema(request, self.public)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/recipes/venv/lib/python3.12/site-packages/rest_framework/schemas/openapi.py", line 80, in get_schema
    operation = view.schema.get_operation(path, method)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/recipes/venv/lib/python3.12/site-packages/rest_framework/schemas/openapi.py", line 146, in get_operation
    operation['operationId'] = self.get_operation_id(path, method)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/recipes/venv/lib/python3.12/site-packages/rest_framework/schemas/openapi.py", line 267, in get_operation_id
    name = self.get_operation_id_base(path, method, action)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/recipes/venv/lib/python3.12/site-packages/rest_framework/schemas/openapi.py", line 250, in get_operation_id_base
    assert inflection, '`inflection` must be installed for OpenAPI schema support.'
           ^^^^^^^^^^
AssertionError: `inflection` must be installed for OpenAPI schema support.
@vabene1111
Copy link
Collaborator

thanks for the report, fixed it, seems like it should have always been in there but never broke without 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants