postmanlabs / postmanlabs/postman-code-generators
Add support for acv.addFormats
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1k
- Forks
- 381
- PR merge metrics
- No merged PRs in 30d
Description
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"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the Ajv validation setup used by the code generators and read how schemas are currently validated. Add support for the ajv-formats plugin, then verify that schemas using the JSON Schema byte format and the plugin's other formats no longer produce unknown-format errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100