Keep primitive types within JSON schema draft specs
See original GitHub issueAdding the file
“primitive” is not something that is out-of-the-box validation by any JSON schema validator. It seems like this type is not a primitive, and also requires additional checks for consumes
.
This requires a special edge case just for validating when type
is file
. And in fact, it is not validating the type
, but rather the consumes
.
It seems lie the appropriate path would be to not add to JSON schema spec, since developers implementing tools for swagger would simply perform their own assertions for multipart/form at the framework level.
Issue Analytics
- State:
- Created 8 years ago
- Comments:20 (18 by maintainers)
Top Results From Across the Web
Understanding JSON Schema
Note: This book describes JSON Schema draft 2020-12. ... The names of the basic types in JavaScript and JSON can be confusing when...
Read more >Specification - JSON Schema
The specification is split into two parts, Core and Validation. ... JSON Schema Core, defines the basic foundation of JSON Schema.
Read more >A Vocabulary for Structural Validation of JSON - JSON Schema
String values MUST be one of the six primitive types ("null", "boolean", "object", "array", "number", or "string"), or "integer" which matches ...
Read more >Numeric types — Understanding JSON Schema 2020-12 ...
There are two numeric types in JSON Schema: integer and number. They share the same validation keywords. ... JSON has no standard way...
Read more >A Media Type for Describing JSON Documents - JSON Schema
This Internet-Draft is submitted in full conformance with the provisions of ... specifications, define keywords allowing authors to describe JSON data in ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
A primitive type is a type that can be validated on value alone. For something like file, hyper media extensions can be used.
Related: https://github.com/OAI/OpenAPI-Specification/issues/3024