The schema defines RawExtension to be an object with a required raw property that's a byte-format string. So the codegen emits it as struct RawExtension { raw: ByteString }
In reality the schema is wrong. The server-side RawExtension.raw is indeed a []byte, but the contents are the JSON-serialized form of some other value. The RawExtension is serialized to JSON by emitting this serialized form. So RawExtension should be represented by serde_json::Value
The schema defines
RawExtension
to be an object with a requiredraw
property that's a byte-format string. So the codegen emits it asstruct RawExtension { raw: ByteString }
In reality the schema is wrong. The server-side
RawExtension.raw
is indeed a[]byte
, but the contents are the JSON-serialized form of some other value. TheRawExtension
is serialized to JSON by emitting this serialized form. SoRawExtension
should be represented byserde_json::Value