Azure / azure-openapi-validator

Azure Open API Validator
MIT License
47 stars 46 forks source link

[ValidFormats] Only validate "format" when "type" is expected primitive type #686

Closed mikeharder closed 5 months ago

mikeharder commented 5 months ago

Per https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#data-types, I believe we should only validate properties named format if there is a sibling property named type with value "boolean" | "integer" | "number" | "string".

konrad-jamrozik commented 5 months ago

Don't forget to bump the version of the ruleset in the package.json