Features
caution
Work in progress, so some features are missing
- No reflection or
interface{}/any- The json encoding is code-generated, optimized and uses go-faster/jx for speed and overcoming
encoding/jsonlimitations - Validation is code-generated according to spec
- The json encoding is code-generated, optimized and uses go-faster/jx for speed and overcoming
- Code-generated static radix router
- No more boilerplate
- Structures are generated from OpenAPI v3 specification
- Arguments, headers, url queries are parsed according to specification into structures
- String formats like
uuid,date,date-time,uriare represented by go types directly
- Statically typed client and server
- Convenient support for optional, nullable and optional nullable fields
- No more pointers
- Generated
Optional[T],Nullable[T]orOptionalNullable[T]wrappers with helpers - Special case for array handling with
nilsemantics relevant to specification- When array is optional,
nildenotes absence of value - When nullable,
nildenotes that value isnil - When required,
nilcurrently the same as[], but is actually invalid - If both nullable and required, wrapper will be generated (TODO)
- When array is optional,
- Generated sum types for oneOf
- Primitive types (
string,number) are detected by type - Discriminator field is used if defined in schema
- Type is inferred by unique fields if possible
- Primitive types (
- Extra Go struct field tags in the generated types
- OpenTelemetry tracing and metrics
Not implemented
- Content-types
- XML
Incompatibility
durationis a Gotime.Durationformat, but JSON Schema defines it as RFC 3339 duration.