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: switch alias to json #943

Merged
merged 2 commits into from
Feb 15, 2024
Merged

feat: switch alias to json #943

merged 2 commits into from
Feb 15, 2024

Conversation

wesbillman
Copy link
Collaborator

Fixes #908

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"`
Copy link
Collaborator Author

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.

Copy link
Collaborator Author

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 😬

Copy link
Collaborator

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
Copy link
Collaborator

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.

Copy link
Collaborator Author

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!

@wesbillman wesbillman merged commit ee0010d into main Feb 15, 2024
@wesbillman wesbillman deleted the switch-alias-to-json branch February 15, 2024 20:45
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.

Consider switching "alias" annotation to "json"
3 participants