-
Notifications
You must be signed in to change notification settings - Fork 8
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: switch alias
to json
#943
Conversation
backend/schema/field.go
Outdated
Comments []string `parser:"@Comment*" protobuf:"3"` | ||
Name string `parser:"@Ident" protobuf:"2"` | ||
Type Type `parser:"@@" protobuf:"4"` | ||
HTTPAlias string `parser:"('alias' 'http' @Ident)?" protobuf:"5"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just want to check that we're ok with this new HTTPAlias
name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, @alecthomas does this parser change look correct to you? I sort of just guessed 😬
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
@@ -12,11 +12,11 @@ func TestTransformFromAliasedFields(t *testing.T) { | |||
schemaText := ` | |||
module test { | |||
data Inner { | |||
waz String alias foo | |||
waz String alias http foo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if we should call the aliasing json
? It is currently specific to the http ingress, but it is also only to do with JSON fields, not HTTP in general. I've gone back and forth on it, WDYT @wesbillman @worstell ?
Just thinking about it again - it's called "JSON" in each language. Let's call it that here too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I like that too!
fe59473
to
d570dce
Compare
c0d12ac
to
f7ea4f7
Compare
Fixes #908