OpenAPI Test Kit for OpenAPI Schema Object


I'm Francesco Guardiani, from Eclipse Vert.x. In Vert.x we have a module called vertx-web-api-contract that helps users to build a router and the requests validation process from an OpenAPI spec. The package is working, but it misses features from OpenAPI because of internal usage of a json schema validator draft-4 compliant. That's why we are planning to build a JSON Schema validator that validates OpenAPI object schemas (and eventually JSON Schema draft-7 compliant schemas). This is because, using any JSON Schema Validator, we can't afford to support every stuff of OpenAPI object schema, for example:
  • nullable -> all JSON Schema validators threat null as type, not as property
  • discriminator -> no support at all
With some workarounds we can afford to support it, but it can be a very ugly implementation. There are also other reasons why we want to implement our own validator, so this is the good moment for us.
The real problem of this project is testing: for draft-7 we have a test kit from Json Schema Organization, but for OAS 3 no one. I'm planning to fork the json schema tests to build an OpenAPI 3 schemas test kit

Now, Is the OAI interested to build a test kit? My idea is:
  • First part: fork of Json Schema org test kit to build and test validators
  • If you want I already built a OpenAPI test spec for parameter deserialization: Basically, you should build a test that implements all paths of the spec, where every path represents a test, and you have to respond with a json with same data you have sent "serialized" (this is the test impl). WIth a tool/language you want we can implement a test runner that checks if a test implementation of a server tooling has all the stuff required from the spec. We can of course improve that spec including all things we want (json/xml/multipart tests)
In every case I need to build the first part for our new validator, but I'm proposing to build it inside OAI so I can follow strictly the OpenAPI Specification and at the same time donate a very useful tool that can help growing the tooling

Vert.x Mantainer,

Join to automatically receive all group messages.