Open xavier630 opened 2 months ago
If you need to have that level of control over the JSON encoding of a type, Conjure probably isn't the right thing to be using to define it.
Sounds fair. This type is pretty widely consumed by other services and defined in a conjure spec - but agreed that that doesn't mean it has to be like that.
What happened?
Recently while working on a use case which involved Jackson serialisation, a lot of the potential workflows required annotating classes and fields with annotations like
@JsonPropertyOrder(alphabetic = true)
.However, since the class I wanted to serialise came from Conjure (via Conjure-Java) and Conjure doesn't support annotations currently (from my searching of the docs), it wasn't possible to set these annotations.
There were quite a few cases where I wanted annotations on my conjure-generated classes and their fields like the above.
This issue applies mostly to Conjure Java, but I've opened it in Conjure since it relates to the Conjure specification itself.
One proposal would be to allow annotations on Conjure types and their properties like:
You would want it to be fairly flexible and open so that it could work with transpilers for various different languages.