Callbacks runtime expressions in multipart bodies
Hi, In the OpenAPI spec, when defining a Callback Object, you can use a runtime expression in the form of:
$request.body#...
What goes after "body" should be a JSON pointer expression.
However, when the HTTP request contains a multipart body, I fail to see how to reference a specific body part, where the JSON pointer expression is to be applied.
Any hint on how to express this in OpenAPI?
Hmm.. yeah, this is a limitation in runtime expressions where it (in my view) over-constrains the fragment syntax. Which ought to be defined by the link target response media type. I'm going to tag this with links as we don't have a separate tag for callbacks, but both use runtime expressions.
@jdegre I think this boils down to whether the runtime expression is evaluated on the serialized data format (in which case the fragment syntax needs to be correct for the media type), or whether it's run on the parsed in-memory representation (the thing the schema validates, before the Encoding Object is applied to map that structure into the multipart body).
If it applies to the in-memory form, then you can use as with any other schema-described data structure. I have no idea what was intended here, though.
@OAI/tsc now that we have somewhat formalized the notion of in-memory vs serialized data, can we use that to refine how this sort of thing works?