.NET API
IResponseSchemaSupport
Tracon.Abstractions.dllAn optional interface of an IModelProvider that states which response schema its client sends to the model for a binding.
public interface IResponseSchemaSupportRemarks
Section titled “Remarks”The validation report (POST /api/agents/validate) calls it for the binding and for every
ModelBinding.Fallbacks link, and warns the author about each difference: a
property that is optional in the author’s schema and required on the wire, a bound that
is not sent, and (in strict mode) a part the service refuses. A provider that does not implement this
interface adds nothing to the report.
The answer has to be computed the way the client computes it for a request. A provider that does not rewrite the schema returns the schema it was given, ResponseSchemaShape.Strict from its own setting, and empty lists.
Lifetime and threading
The registry holds the provider as a singleton and the validation path calls the method on it, so it may run concurrently. Keep no state between calls: the validation path is not a hot path, and a cached answer would be a second place that drifts from the client.
Tenant mode
The answer is tenant-independent: it depends on the binding and the schema, not on the tenant’s own credential.
Delivery
A computation over its arguments, with no side effect and no request to the provider: no delivery guarantee applies.
Methods
Section titled “Methods”DescribeResponseSchema(ModelBinding, JsonElement)
Section titled “ DescribeResponseSchema(ModelBinding, JsonElement)”Describes the response schema the provider’s client sends for a binding.
ResponseSchemaShape DescribeResponseSchema(ModelBinding binding, JsonElement schema)Parameters
Section titled “Parameters”binding ModelBinding
The binding. A fallback link is described with a binding that carries only its provider and model, because a link receives none of the primary binding’s ModelBinding.ProviderSettings.
schema JsonElement
The schema the author wrote. A JSON object.
Returns
Section titled “Returns”The shape of the schema on the wire.
Exceptions
Section titled “Exceptions”A setting of the binding has a value of the wrong type.
The schema is not a valid schema document.