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

"if present" validation #486

Open
clemensv opened this issue May 2, 2020 · 5 comments
Open

"if present" validation #486

clemensv opened this issue May 2, 2020 · 5 comments
Labels
bug Something isn't working component/event

Comments

@clemensv
Copy link

clemensv commented May 2, 2020

We are getting this issue reported against Event Grid: https://twitter.com/jonatasbaldin/status/1256512556782452737?s=20

"currently, the cloudschema field is present but empty, and, per the spec: "If present, MUST be a non-empty URI""

My stance is that a "null" value, i.e. the simple presence of the attribute name in a dynamic collection, does not indicate "present" in the sense of the rules we have for attributes. "null" is "no value" and therefore not present.

@clemensv clemensv changed the title "if not empty" validation "if not present" validation May 2, 2020
@deissnerk
Copy link
Contributor

We actually had a discussion about this on Slack almost a year ago:
https://cloud-native.slack.com/archives/C9DB5ABAA/p1558713174012100

@clemensv clemensv changed the title "if not present" validation "if present" validation May 3, 2020
@clemensv
Copy link
Author

clemensv commented May 3, 2020

@deissnerk the Slack app does not show replies on your question there.

@deissnerk
Copy link
Contributor

@clemensv It was not a thread, but @duglin replied the next day in the channel, and @duglin, you and me discussed. We basically concluded that null values should be interpreted as if the value was not present. Not all protocol bindings / formats support null values. Of course null values should not be confused with empty strings.

@slinkydeveloper
Copy link
Member

slinkydeveloper commented May 4, 2020

@clemensv cloudschema field? Is that an extension?

@slinkydeveloper slinkydeveloper added bug Something isn't working component/event labels May 20, 2020
@n3wscott
Copy link
Member

Any update from @clemensv ? I am unaware of cloudschema and it sounds like it is an extension, and in that case if it does come in or out as an empty string or nil, I am not sure the go-sdk will know to omit it as an extension. Is that the bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component/event
Projects
None yet
Development

No branches or pull requests

4 participants