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

swagger-ui-react onComplete is no longer called with a SwaggerUi instance #9876

Closed
julien-capellari opened this issue Apr 26, 2024 · 1 comment

Comments

@julien-capellari
Copy link

Q&A (please complete the following information)

  • OS: Wwindows
  • Browser: Chrome
  • Method of installation: npm
  • Swagger-UI-React version: 5.17.0
  • Swagger/OpenAPI version: 3.0

Configuration

Swagger-UI-React configuration options:

const handleComplete = useCallback((swagger) => {
  ...
  swagger.preauthorizeApiKey('bearer', token);
}

return <SwaggerUI spec={spec} onComplete={handleComplete} />

Describe the bug you're encountering

handleComplete is called, but with no arguments. Instead I see this error : TypeError: Cannot read properties of undefined (reading 'preauthorizeApiKey')

Expected behavior

handleComplete should be called with a SwaggerUI instance.

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

No branches or pull requests

3 participants