ehmicky

Results 372 comments of ehmicky

I think the correct behavior for `type: "file"` would be to delete the `type` property. When it comes to `type: "file"`, my understanding is that it means the MIME type...

If you wanted to go ahead with the second idea (guessing the `type`) I can submit a PR.

I think there might still be some value to try to convert it. Specifically when OpenAPI is used not only to document an API but also to validate requests. I.e....

`type: "file"` is present both in `Parameter Object` and in `Response object`. According to the specification: - [`An additional primitive data type "file" is used by the Parameter Object and...

I would personally take it from this angle: in OpenAPI 2.0, request parameters, request body, response body and response headers can be described using a slight variation of JSON schema...

I've created #19 and #20 as follow ups to this discussion. When both are closed, maybe documenting that OpenAPI 2.0 *may* be supported might be possible. So should this issue...

I also think that OpenAPI 3.0 is the future and people will eventually leave OpenAPI 2.0. I would also personally love to just skip supporting it in my own projects...

Except for `discriminator` (which is removed anyway in both versions since it's not valid JSON schema) and `type: "file"`, the properties that are present in both OpenAPI 2.0 and 3.0...

Yes that makes sense! I created #19 for that purpose, maybe we should start working on that issue first?

Just to make sure I understand what you mean: you mean converting an OpenAPI 3.0 [Parameter object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#parameterObject) into a JSON schema v4? If so it might be a little tricky...