28 ms·
OP might be conflating OpenAPI [1] which specifies HTTP endpoints of APIs with JSON Schema [2] which specifies data schemas of JSON documents. OpenAPI specs oft
by divbzero 5y ago
OP might be conflating OpenAPI [1] which specifies HTTP endpoints of APIs with JSON Schema [2] which specifies data schemas of JSON documents. OpenAPI specs often use the application/json media type with schemas specified using JSON Schema, but they can also use other media types including binary formats. What OP is really asking is: Why isn’t there {JSON Schema,XML Schema,.proto files} for arbitrary binary formats?
Kaitai [3] mentioned by OP and sibling comments looks interesting, don’t think I’ve seen something like it before.
[1]: https://swagger.io/specification/ https://swagger.io/specification/
[2]: https://json-schema.org/ https://json-schema.org/
[3]: https://kaitai.io/ https://kaitai.io/