Giter Site home page Giter Site logo

Doesn't work with yaml? about swagger-ui HOT 7 OPEN

jensoleg avatar jensoleg commented on July 21, 2024
Doesn't work with yaml?

from swagger-ui.

Comments (7)

tomjoht avatar tomjoht commented on July 21, 2024

I was wondering this same thing. Does the spec have to be in JSON? If so, can you add this note in the theme's documentation?

from swagger-ui.

jensoleg avatar jensoleg commented on July 21, 2024

This is not supported by swagger-ui.
Please check:
swagger-api#595

from swagger-ui.

jordanjennings avatar jordanjennings commented on July 21, 2024

Swagger UI does work with YAML currently, it's just not clearly documented. The "tricky" part is that you actually have to make sure your server is sending the YAML file with the content type set to "application/yaml". Once that's in place it works as expected.

from swagger-ui.

KamilKopaczyk avatar KamilKopaczyk commented on July 21, 2024

Confirmed. I tried to merge this theme with newest swagger-ui (2.1.4). YAML file load, but it looks like some CSS styles don't apply anymore (did they change HTML structure?).

from swagger-ui.

mturner avatar mturner commented on July 21, 2024

@KamilKopaczyk did you ever get this working? Do you have a fork I could take a look at?

from swagger-ui.

gabrielrcouto avatar gabrielrcouto commented on July 21, 2024

I changed the package.json file from:

"swagger-client": "git+https://github.com/jensoleg/swagger-js.git"

to:

"swagger-client": "git+https://github.com/swagger-api/swagger-js.git"

And ran:

npm update
gulp

After that, this project supports YAML ;-) But, some little things (like label colors) are broken...

from swagger-ui.

Vivek2s avatar Vivek2s commented on July 21, 2024

@gabrielrcouto I change the package.json file but after npm update causing me some error.
It would be benefit for all if you could give the link to your repository so we can fork it

from swagger-ui.

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.