swagger-ui
swagger-ui copied to clipboard
Doesn't work with yaml?
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?
This is not supported by swagger-ui. Please check: https://github.com/swagger-api/swagger-ui/issues/595
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.
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?).
@KamilKopaczyk did you ever get this working? Do you have a fork I could take a look at?
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...
@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