pyopenapi / pyswagger

An OpenAPI (fka Swagger) client & converter in python, which is type-safe, dynamic, spec-compliant.
MIT License
385 stars 89 forks source link

allowing missing --- in yaml files #55

Closed pwfff closed 8 years ago

pwfff commented 8 years ago

Fixes issues #54

mission-liao commented 8 years ago

Thanks, one question: so there is no magic mark to distinguish a yaml file?

pwfff commented 8 years ago

I don't think so :( I'm going with Python's EAFP style here. If we can parse it as YAML, it must be YAML :) the JSON check seems good though, so I left it in. See http://stackoverflow.com/questions/11360858/what-is-the-eafp-principle-in-python

If more formats are supported later this may become more complex.