Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support different content types based on schema type #91

Merged
merged 2 commits into from
Dec 6, 2021

Conversation

h4rikris
Copy link
Member

@h4rikris h4rikris commented Dec 2, 2021

Different schema types uses different data type to represent schemas. Avro and JSON schema types represented in JSON. Protobuf schema type transferred as byte stream. We chose bytes data type in gRPC to make it type agnostic. grpc-gateway uses standard protobuf to JSON mapping. As per the mapping rules byte data type represented as base64 string in json. While constructing HTTP calls clients have to encode/decode base64 data everytime which increases complexity on clients using HTTP API. This PR addresses to remove this extra encoding/decoding use original schema data types in http response.

server/api/schema.go Outdated Show resolved Hide resolved
@h4rikris h4rikris merged commit 1fc405e into master Dec 6, 2021
@h4rikris h4rikris deleted the content-type-response branch December 6, 2021 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants