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 CSS not included in OpenApiComponent styles #447

Open
DavieReid opened this issue Aug 11, 2023 · 2 comments
Open

Swagger CSS not included in OpenApiComponent styles #447

DavieReid opened this issue Aug 11, 2023 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@DavieReid
Copy link
Contributor

DavieReid commented Aug 11, 2023

The OpenApiComponent renders the react-swagger component without any styling.

Root Cause

I suspect the root cause is the fact that esbuild is told to exclude node_modules when bundling the open API component
https://github.com/jpmorganchase/mosaic/blob/main/scripts/bundle.js#L36

The package.json file also mentions a dist/index.css file which is incorrect. Should be dist/styles.css.

Expected Result

Adding the following CSS import to _app.tsx will apply swagger styling

import '@jpmorganchase/mosaic-open-api-component/index.css';

Workaround

Add the following CSS import to _app.tsx

import 'swagger-ui-react/swagger-ui.css';
@DavieReid DavieReid added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed labels Aug 11, 2023
@MayankPrasher
Copy link

Still open ?

@DavieReid
Copy link
Contributor Author

Still open ?

Yes, still open

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants