You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is almost certain that if a type is to be shared across multiple ingress methods, such as HTTP, gRPC, and GraphQL, users will want to be able to use different aliases for different protocols. The choice of alias doesn't allow for that.
It will simplify interacting with HTTP ingress endpoints from Go code such as integration tests, because their will only need to be a single annotation, json:"xyz".
Schema should change to:
data Foo {
field String alias http bar
}
verb bar()
ingress http GET /bar
Go annotations should change to:
json:"bar"
Kotlin annotation should change to something like this, but dig into whether we should just use @JsonProperty? Is this part of JAX-RS or some random thing from Jackson?
@JsonProperty("bar")
Edit: there doesn't seem to be any standard at all. Gson uses SerializedName, Jackson uses @JsonProperty - let's just use @Json.
The text was updated successfully, but these errors were encountered:
Yeah after a bit of googling and chatting with my friend Chad, it seems like there's no standard for this. There are standards for serializing, but they leave out the part about this being for JSON on http. So @Json sounds good to me as well 👍
The rationale is twofold:
alias
doesn't allow for that.json:"xyz"
.Schema should change to:
Go annotations should change to:
Kotlin annotation should change to something like this, but dig into whether we should just use
@JsonProperty
? Is this part of JAX-RS or some random thing from Jackson?Edit: there doesn't seem to be any standard at all. Gson uses
SerializedName
, Jackson uses@JsonProperty
- let's just use@Json
.The text was updated successfully, but these errors were encountered: