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

Schema and field name questions from a front end developer #980

Closed
tannerlinsley opened this issue Aug 2, 2019 · 2 comments
Closed

Schema and field name questions from a front end developer #980

tannerlinsley opened this issue Aug 2, 2019 · 2 comments

Comments

@tannerlinsley
Copy link

Hi, I'm a Front End dev and my backend team is using GRPC gateway to develop our REST API and I am looking for some clarification on a few things. I hope someone can help answer these question and if not, point us in the right direction on contributing to help improve them.

If any of this doesn't make sense, keep in mind, I don't interact with most of this stack on a daily basis and likely only know just enough vocabulary to be dangerous. Tread lightly :)

  • I've been told that the gateway's schema is generated from a proto file and in most cases, these proto files have their own schema and conventions for things like letter casing, field mapping, etc. Why does the gateway only allow generating rest bindings with these opinionated mappings? As an API producer and consumer, I would hope to be able to build or customize the end-resulting JSON schema to match our other services.
    • eg. instead of resource endpoints being snake_cased like /my_resource_name, what about /my-resource-name or even myresourcename? As far as I know I haven't seen an option to customize this.
    • This same concept applies to field properties and parameters as well. We have in many cases, custom field names that map to other areas of our companies API that use acronym-sensitive camel-casing like. columnID. As far as I've found, there is no way to override the key mapping for these fields and thus we are forced to convert between the gateway's columnId to our own columnID both internally and externally (in our front-end and api customers).
@achew22
Copy link
Collaborator

achew22 commented Aug 2, 2019

@tannerlinsley, thanks for filing a bug against our repo. If you could please follow our bug template it would be hugely appreciated. As it states at the top of the bug template:

# The gRPC-Gateway project is maintained by volunteers in their spare time. Please follow these troubleshooting steps before submitting an issue.

[...]

## I still have a problem!
 
Please consider reaching out for help on a chat forum, such as
[Gophers Slack](https://invite.slack.golangbridge.org/) (channel #grpc-gateway).
It's much easier to help with common debugging steps in a chat, and some of
the maintainers are reading the channel regularly. If you
submit an issue which is clearly an environment setup problem, or it's obvious
you haven't tried seeking help somewhere else first, we may close your issue.

What happened when you went to the slack channel?

@tannerlinsley
Copy link
Author

tannerlinsley commented Aug 2, 2019 via email

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

No branches or pull requests

2 participants