yonaskolb / SwagGen

OpenAPI/Swagger 3.0 Parser and Swift code generator
MIT License
626 stars 146 forks source link

Error loading Swagger Spec: Decoding failed at "components": Nothing found #179

Closed haemi closed 5 years ago

haemi commented 5 years ago

Some files give me the error Error loading Swagger Spec: Decoding failed at "components": Nothing found when trying to generate Swift with SwagGen.

One of those files is this: https://github.com/OAI/OpenAPI-Specification/blob/master/examples/v3.0/api-with-examples.yaml

yonaskolb commented 5 years ago

Looks like components is required by the decoder, which it technically doesn’t need to be. Most specs will have components but it shouldn’t fail if they don’t

haemi commented 5 years ago

thanks for your quick response!

Absolutely not to blame you, but does this mean it's a bug in swaggen? If yes, do you plan to work on it?