Skip to content

Vendor Extensions

Rivet emits x-rivet-* extensions to carry C#-level facts that plain OpenAPI cannot express. They are what make the emit → import round-trip stable; every other consumer can ignore them.

ExtensionWhereMeaning
x-rivet-contractoperationContract/controller name the operation came from (drives operationId grouping; reused on import).
x-rivet-endpointoperationThe endpoint (field/method) name within that contract.
x-rivet-brandschemaThis schema is a branded value object (e.g. record Email(string Value)); value is the brand name.
x-rivet-genericschemaThis component is a monomorphised generic (e.g. PagedResult_MemberDto); records the open generic and its type arguments.
x-rivet-csharp-typeproperty schema, dictionary propertyNames schemaThe exact C# type when the JSON Schema alone is ambiguous (DateTimeOffset vs DateTime, ulong, byte[], unrepresentable types; on propertyNames, numeric dictionary key types like int).
x-rivet-fileschema/media typeBinary file content (uploads and downloads).
x-rivet-input-typerequest body schemaName of the C# input record behind a multipart/synthesized body.
x-rivet-query-authoperationEndpoint authenticates via a query parameter: { "parameterName": "token" }.
x-rivet-empty-recordschemaThe C# type is a record with no properties (distinguishes it from a free-form object).

The contract JSON consumed by --from is an internal intermediate representation shared with the sibling runtimes — it is not a public format; OpenAPI (with these extensions) is Rivet's only public output.