question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Keep primitive types within JSON schema draft specs

See original GitHub issue

Adding 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:closed
  • Created 8 years ago
  • Comments:20 (18 by maintainers)

github_iconTop GitHub Comments

1reaction
tlivingscommented, Mar 17, 2016

A primitive type is a type that can be validated on value alone. For something like file, hyper media extensions can be used.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found