Code Monkey home page Code Monkey logo

Comments (10)

Corneldj avatar Corneldj commented on May 17, 2024 9

I hope this is not too late to post. But I had the same issue and found a solution to it:

  1. Check if all your controller methods have [http] tag. If they all do and still doesn't work go to step 2
  2. In your configure function ensure that you have app.UseStaticFiles(); If it still doesn't work go to step 3
  3. Uninstall and reinstall swagger. If it doesn't work go to step 4 (Core Only)
  4. If you are using Core Install Microsoft.AspNetCore.StaticFiles and reference it in your project.

That is as far as I got and mine started working

from swaggerlume.

ludonvl avatar ludonvl commented on May 17, 2024 4

I found a solution to this issue. For me, I've needed to copy the /dist directory in "vendor/swagger-api/swagger-ui" inside the /public of my lumen project. I'm not sure about the proper way but it works for me.

Hope this can help someone.

from swaggerlume.

smuthiya avatar smuthiya commented on May 17, 2024 3

I am getting the same error with my Web APIs built using ASPNETCore - 'SwaggerUIBundle' is undefined
I get this error when i navigate to /swagger to see the UI - but noting loads in browser and I get this error in browser console. However my json endpoint is working i.e. /swagger/v1/swagger.json I get json response back with my API details. But Swagger UI does not work

from swaggerlume.

aligillaniBD avatar aligillaniBD commented on May 17, 2024 1

I am facing the same issue with my flask application. It works perfectly fine on my localhost. When I try to run it on k8s environment which have a reverse proxy. It gives me an error in the console that SwaggerUIBundle is not defined and I am not able to see the documentation due to this error.

from swaggerlume.

DarkaOnLine avatar DarkaOnLine commented on May 17, 2024

is swagger-ui-bundle.js loaded or not ? Where do you see this error ?

from swaggerlume.

Praphulagarwal avatar Praphulagarwal commented on May 17, 2024

If you are working with loopback and having this error you can install swagger-ui-dist from
https://www.npmjs.com/package/swagger-ui-dist
this link.

It resolved my problem

from swaggerlume.

G-Shriya avatar G-Shriya commented on May 17, 2024

I am getting the same error with my Web APIs built using ASPNETCore - 'SwaggerUIBundle' is undefined I get this error when i navigate to /swagger to see the UI - but noting loads in browser and I get this error in browser console. However my json endpoint is working i.e. /swagger/v1/swagger.json I get json response back with my API details. But Swagger UI does not work

Facing the same issue.......Above solutions were of no help

from swaggerlume.

jayasundeep avatar jayasundeep commented on May 17, 2024

I am facing this issue while integrating openapi into SpringBoot application. Any leads would be greater help. TIA

from swaggerlume.

melroyvandenberg avatar melroyvandenberg commented on May 17, 2024

Same here.. Exactly like @aligillaniBD explained. What do I need to do!??? What the hack is going on.

from swaggerlume.

Codestronomer avatar Codestronomer commented on May 17, 2024

Same here, Has anyone found a fix yet? I have a Nestjs application. The documentation works on localhost. Not, the same case on my GCP compute instance.

from swaggerlume.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.