interagent / committee

A collection of Rack middleware to support JSON Schema.
MIT License
871 stars 135 forks source link

Committee OpenAPI 3 locked to version 3.0.x #303

Open hedselu opened 3 years ago

hedselu commented 3 years ago

Hi!

First of all, thanks for great gem. I just found a problem when I upgrade OpenAPI version in document to 3.1.0. The current implementation has locked version to 3.0.x, and fails finding paths for this document.

Current behaviour:

Expected behaviour:

Related committee file for this issue: https://github.com/interagent/committee/blob/v4.3.0/lib/committee/drivers.rb#L52 Latest version of OpenAPI changelog: https://github.com/OAI/OpenAPI-Specification/releases

ota42y commented 3 years ago

Thank you for reporting! However, committee doen't support OpenAPI 3.1.0 yet. (I have not been able to verify that it works properly)

So we can't load OpenAPI 3.1.0 now sorry

hedselu commented 3 years ago

@ota42y understandable, thank you for answering!

Let me know if I should try verifying support for 3.1.x or someone else might take care of this. Of course I'd be happy to contribute.

ota42y commented 3 years ago

I haven't check the OpenAPI 3.1.0 specification yet, so I haven't decided how much modification is needed ... 🙇

hedselu commented 3 years ago

@ota42y no problem, thanks for response! 🙏

ahx commented 1 year ago

One of the main differences with 3.1 and committee that I have noticed is the type field in JSON Schema. In 3.0 (and legacy JSON Schema version) it only accepts a string like type: integer, but in 3.1 (and at least JSON Schema draft-7) it support lists as well like type: [integer, string] or even type: [integer, null] (which replaces nullable).

https://github.com/davishmcclurg/json_schemer supports draft-7.