andrenth / ocaml-swagger

Swagger 2.0 code generator for OCaml
37 stars 10 forks source link

Treat "default" response codes as errors #14

Closed carlosdagos closed 5 years ago

carlosdagos commented 5 years ago

This should address #13

From what I can grok in the code, error codes are simply skipped, so just treating "default" as an error should be enough.

carlosdagos commented 5 years ago

Just force-pushed a minor fixup: Instead of comparing to default, better to lowercase first and then compare. In case people type Default or whatever, I'm not sure if casing is at all relevant in this case, but just to be on the safe side 😄

carlosdagos commented 5 years ago

Also just bumped the patch version. Don't know how you want to manage versioning in this case @andrenth, feel free to cherry pick or suggest any changes, will be happy to fix it up :)

andrenth commented 5 years ago

Went ahead and merged it. Usually on 0.x I don't care much about patch version since there's no compatibility guarantees anyway, but it's not a problem either.