Request Encoding
OpenAPI’s parameter serialization is deceptively complex. The same data serializes completely differently depending on style, location, and flags. We built an encoder that handles all of it declaratively.
Parameter Encoding Styles
Full implementation of OpenAPI’s serialization styles: simple, form, label, matrix, spaceDelimited, pipeDelimited, and deepObject. Each interacts with the explode flag, allowReserved flag, and parameter location.
The combinatorial complexity: the same array [a, b, c] serializes as ?tags=a,b,c (form, explode=false), ?tags=a&tags=b&tags=c (form, explode=true), ?filter[0]=a&filter[1]=b&filter[2]=c (deepObject), ?tags=a%20b%20c (spaceDelimited), or ;tags=a,b,c (matrix).
Rather than implementing each combination procedurally, the encoder maps style configurations to RFC 6570 URI Template operators with configured separators. Declarative encoding from a declarative spec.
Request Template Compilation
Operations compile to request templates that can be instantiated with parameter values. The template captures HTTP method, URL pattern, headers, and body structure. Execution fills in the template—no string concatenation of user input into URLs or headers.
Content-Type Encoding
Default encodings: JSON for application/json and +json types, form for URL-encoded with OpenAPI encoding object support, multipart for RFC 7578 with per-part content encoding selection. Handles file uploads with custom filename properties. Custom encoders can be registered for any media type.