Closed staceymoore closed 9 years ago
Thanks for the report! It appears that swagger-tools isn't setting statusCode on it's mock routes and Hapi doesn't set the statusCode by default either. Somebody should do that! :) I just filed an issue on swagger-tools: https://github.com/apigee-127/swagger-tools/issues/269.
swagger-tools@0.9.4
has been released with this fix.
Thanks, @whitlockjc! @staceymoore could you update your dependencies - ensuring you have that ^ and try again?
:+1: Solved! @whitlockjc @theganyo Thanks for the speedy fix!
Now I can kill that extra mock server that was running on express.
Awesome! Thanks!
Happy to help.
Steps to replicate:
Replace the contents of swagger.yaml with these contents:
swagger project start -m
http://127.0.0.1:10010/weather
and you will receive a 500 error.Here is the debug output for the error:
This problem only happens when using Hapi. I tested the same code with both Express and Connect; it behaved as expected in both cases and returned the mock response.