question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Swagger-ui minified not displaying part of Responses

See original GitHub issue

Q&A (please complete the following information)

  • OS: macOS
  • Browser: chrome, safari, firefox, …
  • Version: latest
  • Method of installation: npm
  • Swagger-UI version: 3.17.3
  • Swagger/OpenAPI version: Swagger 2.0

Content & configuration

I have a frontend app using Vue.js (2.5.16) along with vie-cli 3.0 (webpack 4) and swagger-ui (3.17.3): https://github.com/ricardodejuan/vue_swaggerui

The same problem with vue-cli 2.0: https://github.com/ricardodejuan/vue_swaggerui_webpack2

When I run in localhost the entire definition is displayed correctly, but when i create the version to production (npm run build) and I am deploying on Pivotal Cloud Foundry using the staticbuildpack I cannot see the Example value or Model inside of the black boxes (see screenshots below)

Swagger/OpenAPI definition: https://petstore.swagger.io/v2/swagger.json

Swagger-UI configuration options:

import SwaggerUIBundle from 'swagger-ui'
import 'swagger-ui/dist/swagger-ui.css'

SwaggerUIBundle({
        url: 'https://petstore.swagger.io/v2/swagger.json',
        dom_id: '#swagger-ui',
        deepLinking: false,
        presets: [
          SwaggerUIBundle.presets.apis
        ],
        plugins: [
          SwaggerUIBundle.plugins.DownloadUrl
        ]
      })

Screenshots

https://imgur.com/a/FpzT5C7

How can we help?

I don’t know if the issue is a conflict when I am minifying the app or i am missing any configuration. I have the same issue with Vue-Cli 2.0.

Should i modify something in the webpack to separate files to be minified?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
shockeycommented, Jul 17, 2018

@ricardodejuan perfect, glad it worked!

As mentioned before, I’m going to keep this open so we can move away from needing this preservation entirely.

0reactions
shockeycommented, Jul 19, 2018

This will be resolved (no pun intended) on Thursday, when we cut a new release 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

swagger-ui-express not displaying response - node.js
The response ui part of it, is not displaying. Even though Chrome is getting 200 http response and the response data. SOLUTION: The...
Read more >
Swagger UI tutorial | Documenting APIs - Idratherbewriting.com
Swagger UI provides a display framework that reads an OpenAPI specification document and generates an interactive documentation website.
Read more >
swagger-ui-react - NPM Package Overview - Socket - Socket.dev
This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code....
Read more >
OpenAPI Specification - Version 2.0 - Swagger
Relevant only for Schema "properties" definitions. Declares the property as "read only". This means that it MAY be sent as part of a...
Read more >
swagger-ui: Swagger UI is a collection of HTML, Javascript, and ...
Only part of the parameters previously supported are available. The JSON Form Editor is not implemented. Support for collectionFormat is partial. l10n ( ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found