postmanlabs / postman-code-generators

Common repository for all code generators shipped with Postman
Apache License 2.0
992 stars 350 forks source link

Add support for acv.addFormats #696

Open TRoussel opened 1 year ago

TRoussel commented 1 year ago

Is your feature request related to a problem? Please describe. Since version 7, Ajv does not include formats defined by JSON Schema specification. Hence, "byte" data format is not part of ajv validator and reports an error if we try to validate a schema with such data format using Postman.

Describe the solution you'd like This, and several other formats are provided by ajv-formats plugin. Add this plugin to Postam to be able to validate schemas which define attributes of byte format (and all other formats part of the plugin)

Additional context Error reported by ajv validator when using 'byte' data format : "unknown format "byte" is used in schema at path "#/foo/bar"