ErikWittern / openapi-snippet

Generates code snippets for given Swagger / Open API documents
MIT License
115 stars 66 forks source link

There are some issues that can crop up related to missing or "any type" parameter schemas #89

Open michaelgwelch opened 2 years ago

michaelgwelch commented 2 years ago

I'm working on fixes for the following:

michaelgwelch commented 2 years ago

I'm not even sure why the code checks for param.type. The spec does not call out a type field on the Parameter Object. I see that some of the tests cases like (Instagram) use a type field on parameter. But I'm not convinced that's not an error. I'm going to test with Swagger API. Maybe it used to allow it in older version of the spec. Yep that's the case: OpenAPI 2.0 allowed that: https://swagger.io/docs/specification/2-0/describing-parameters/