JamesMessinger / swagger-server

No longer maintained. Please use https://github.com/BigstickCarpet/swagger-express-middleware
MIT License
149 stars 47 forks source link

Looks like HTML root file ref should contain JSON #30

Open k41n opened 8 years ago

k41n commented 8 years ago

Hello!

Please check that. I was trying to write it from scratch but it was giving me 410 Gone on requesting index. So I took sample and was cutting it down until I got what is breaking things. It was JSON in HTML

In repo below requesting GET / will cause error. However if you will add any key:value inside JSON, it will work:

this does not work:

      <textarea id="pet" name="pet" cols="60" rows="15" class="form-control"
                onkeydown="updateUI()" onkeyup="updateUI()" onchange="updateUI()">{
}                            </textarea>

while this does:

      <textarea id="pet" name="pet" cols="60" rows="15" class="form-control"
                onkeydown="updateUI()" onkeyup="updateUI()" onchange="updateUI()">{
"a": "b"
}                            </textarea>

Please fixme if I am doing something wrong...

https://github.com/k41n/sr-mock