3 ms·
JSON/REST does not declare its schema, it's like talking about type vs dynamic typed language.
by Thaxll 4y ago
JSON/REST does not declare its schema, it's like talking about type vs dynamic typed language.
- arein3 4y agoA subjective opinion, but it's much easier to read some documentation and checking maybe an OpenAPI spec than having to deal with protobuf. You also have solutions like GraphQL that define a schema, or you can publish some kind of schema (a good thing to do) but use JSON instead of a binary format.
- zeroq 4y agoType checking and schema are two different things. Both your application and documentation will assume certain state to be true, but only with type checking you can actually verify if it's correct.
- sa46 4y agoI prefer reading proto files with services over OpenAPI yaml. Here's the pet store example to compare. - https://github.com/project-flogo/grpc/blob/master/proto/grpc2grpc/petstore.proto https://github.com/project-flogo/grpc/blob/master/proto/grpc... - https://github.com/OAI/OpenAPI-Specification/blob/main/examples/v3.0/petstore.yaml https://github.com/OAI/OpenAPI-Specification/blob/main/examp...
- morelisp 4y agoProtobuf also does not declare its schema. Message parsers can be generated from a schema, but that's also true for REST over JSON. Even ad hoc REST APIs often have better self-declaration of resource types than protobuf. (I still like protobuf, but the schemas are a terrible reason to like it.)