mosaic
mosaic copied to clipboard
Swagger CSS not included in OpenApiComponent styles
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';