jpmorganchase / mosaic

https://mosaic-mosaic-dev-team.vercel.app
https://mosaic-mosaic-dev-team.vercel.app
Apache License 2.0
22 stars 20 forks source link

Swagger CSS not included in OpenApiComponent styles #447

Open DavieReid opened 1 year ago

DavieReid commented 1 year ago

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';
MayankPrasher commented 1 month ago

Still open ?

DavieReid commented 1 month ago

Still open ?

Yes, still open