Yelp / swagger_spec_validator

Other
104 stars 71 forks source link

Altering v2.0 to allow for extra simple types and no requiring external definition file #115

Closed finkedave closed 5 years ago

finkedave commented 5 years ago

This custom spec is needed by archer_web swagger docs.

Some variant columns can be NaN and infinity. To make it completely visible which columns can be NaN and infinity we want to be able to specify them within the swagger spec. Open API 2.0 currently only allows a column type to be array, boolean, integer, null, number, object, or string. This update adds in the option to use inf-num for numbers that can be NaN, inf-num for numbers that can be Infinity and nan-inf-num for numbers that can be Infinity or NaN.

Having this custom definition file internal to this repos also makes it possible to not require external internet access for validating the spec.

custom_json_schema.json is copy of the file found at http://json-schema.org/draft-04/schema except that is adds contains 3 additional enum items in simple types definition.