Documentation
¶
Overview ¶
Package runtime provides shared helper types and functions for code generated by oapi-codegen. The contents of this package are produced by the code generator itself from the same embeddable templates that are normally inlined into every generated file. By generating the helpers once into standalone sub-packages (types, params, helpers), multiple generated packages can import them instead of each duplicating their own copy.
Sub-packages:
- types/ — custom Go types for OpenAPI format mappings (Date, Email, UUID, File, Nullable)
- params/ — parameter serialization/deserialization functions
- helpers/ — utility functions for request body encoding (MarshalForm)
Regenerate after changing any codegen template:
go generate ./runtime/...
Directories
¶
| Path | Synopsis |
|---|---|
|
Package helpers provides utility functions for request body encoding, including MarshalForm for form-encoded request bodies.
|
Package helpers provides utility functions for request body encoding, including MarshalForm for form-encoded request bodies. |
|
Package params provides parameter serialization and deserialization functions for OpenAPI-style parameters (simple, form, label, matrix, etc.).
|
Package params provides parameter serialization and deserialization functions for OpenAPI-style parameters (simple, form, label, matrix, etc.). |
|
Package types provides custom Go types for OpenAPI format mappings: Date, Email, UUID, File, and the generic Nullable[T] wrapper.
|
Package types provides custom Go types for OpenAPI format mappings: Date, Email, UUID, File, and the generic Nullable[T] wrapper. |
Click to show internal directories.
Click to hide internal directories.