Skip to main content

Module models

Module models 

Source
Expand description

Types for reading services.json, the machine-readable endpoint description written by endpoint-gen.

The schema types are not redefined here. They are re-exported from endpoint_libs::model, which is where endpoint-gen gets them from when it writes the file. This crate previously kept hand-copied duplicates, which silently rotted: EnumVariant.comment was renamed to description upstream and the copy here never followed, so every current services.json failed to parse with missing field 'comment'. The vendored Type had also drifted badly — it still listed Date, Int, BigInt, Numeric, Inet and DataTable, none of which exist upstream, and was missing UInt32, Int32, Int64, Float64, NanoId, IpAddr and StructTable.

Anything describing the wire schema belongs upstream. Only this tool’s own config types are defined here.

Structs§

Config
config.toml — preset parameter values, keyed by endpoint.
EndpointData
EndpointMetadata
One endpoint, flattened into what the driver needs to issue a call.
EndpointSchema
EndpointSchema is a struct that represents a single endpoint in the API.
EnumVariant
EnumVariant is a struct that represents the variants of an enum.
Field
Field is a struct that represents the parameters and returns in an endpoint schema.
ParameterMetadata
Service
Service is a struct that represents a single service in the API.
Services
The whole of services.json.

Enums§

ParamValue
Type
Type is an enum that represents the types of the fields in an endpoint schema.