op-energy-foundation / op-energy-blockspan-service

0 stars 0 forks source link

update swagger-ui-dist to 5.6.2 #36

Closed dambaev closed 4 months ago

dambaev commented 4 months ago

Had to modify swagger-ui.css in order to satisfy postcss loader

dambaev commented 4 months ago

so tldr: the latest swagger-ui version, which runs without issues now (ie: integrated with our frontend) is 5.6.2. Disabling/enabling build optimization has no effect here. All newer versions compile with errors we saw initially and if the there will be a requirement to update swagger ui then it should be splitted out from frontend and be deployed as a separate app in order to not to interfere with angular's build optimizations, webpacks and so on.

This version still does not show error body, but have proper mobile layout. @Natsvora discovered, that swagger don't show error body due to 4xx error response has no content-type defined. Thus there is https://github.com/op-energy-foundation/op-energy/pull/13 PR to make errors to return responses in JSON format to satisfy swagger-ui component. It had been confirmed that error response in JSON format allowes swagger-ui to display it's body