We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
spec
Example Swagger/OpenAPI definition:
Swagger-UI configuration options (using Next.js):
import SwaggerUI from 'swagger-ui-react'; import openapi from '../openapi'; const Docs = () => { return <SwaggerUI spec={openapi} />; }; export default Docs;
SwaggerUI
Warning: Failed prop type: Invalid prop `spec` of value `[object Object]` supplied to `SwaggerUI`, expected one of [null,null].
swagger-ui-react
<SwaggerUI spec={openapi} />
PropTypes.oneOf
spec: PropTypes.oneOf([ PropTypes.string, PropTypes.object, ]),
should be PropTypes.oneOfType, instead (see github.com/facebook/react/issues/1919 for reference).
PropTypes.oneOfType
The text was updated successfully, but these errors were encountered:
oneOfType
fix(swagger-ui-react): Use oneOfType in spec prop validation (fix #6399…
52360a0
…) (#6400)
Successfully merging a pull request may close this issue.
Q&A
Content & configuration
Example Swagger/OpenAPI definition:
Swagger-UI configuration options (using Next.js):
Describe the bug you're encountering
spec
attribute of theSwaggerUI
react component, I get the following warning:To reproduce...
swagger-ui-react
and import theSwaggerUI
component.spec
attribute as such:<SwaggerUI spec={openapi} />
Expected behavior
Additional context or thoughts
PropTypes.oneOf
in these propType definitions:should be
PropTypes.oneOfType
, instead (see github.com/facebook/react/issues/1919 for reference).The text was updated successfully, but these errors were encountered: