Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Supporting x-nullable #112
Swagger/OpenAPI are in a weird state between v2.0 and v3.0. There have been a few keywords added to v3.0 that probably should have been backported into a v2.1 or something. Instead the authors have quite adamantly shouted "No, this is coming in v3!" and everyone has been kinda stuck waiting, or using
You folks have done an awesome job supporting some of these
Currently you don't support
(Maybe their renderer or parser-of-choice is lax enough to support it, but ReDoc and any strict parser will error.)
More on this here swagger-api/swagger-editor#1302
Instead, OpenAPI 3.0 will add
Supporting this field during this odd v2.0 / v3.0 gap would be amazing, and I can't get Dredd running at work until this is done.
referenced this issue
Jul 11, 2017
referenced this issue
Jul 17, 2017
I'd expect most of you are asking about this to use with Dredd. Right now Dredd is receiving the Swagger specific schema so to implement this feature we would need to craft JSON Schema's so that Dredd can use a JSON schema. JSON Schema supports multiple
Alternatively, we could add support to Dredd for validating Swagger schemas which could include
@kylef, Yes I think that is what is being described in this issue. Since your first option is probably a lot of work and because this repository is specifically focused on swagger and not JSON schema I don't think it is wise to change that.
What is being said is this new feature is being added in v3.0 of swagger only. Since upgrading this to swagger 3.0 is probably a lot of work we might implement what other tools are doing and that is allowing the vendor specific
Hey @kylef. Yeah It's a pain in the butt I know, but OpenAPI is not really JSON Schema as you probably know. OpenAPI v2 is 90% JSON Schema, and v3 is 99% JSON Schema, but this type issue is the largest remaining difference.
If a one-line hack could be added to dredd somehow, that says
Sure OAI3 has been out for a while now, but support is still really low. All of our stuff at WeWork is OAI2 whilst we wait on various tools to support OAI3 (like ReDoc, which has a 2.0.0-alpha1 supporting OAI3 yaaaay!) so this x-nullable support is still relevant.
Thanks for taking the time to look into this @kylef!