Skip to main content

Crate gts

Crate gts 

Source

Re-exports§

pub use entities::GtsConfig;
pub use entities::GtsEntity;
pub use entities::GtsFile;
pub use entities::ValidationError;
pub use entities::ValidationResult;
pub use files_reader::GtsFileReader;
pub use gts::GtsSchemaId;Deprecated
pub use gts::GTS_ID_URI_PREFIX;
pub use gts::GtsInstanceId;
pub use gts::GtsTypeId;
pub use ops::GtsOps;
pub use path_resolver::JsonPathResolver;
pub use schema::GtsDeserialize;
pub use schema::GtsSchema;
pub use schema::GtsSerialize;
pub use schema::JSON_SCHEMA_DRAFT_07;
pub use schema::TraitSchemaState;
pub use schema::deserialize_gts;
pub use schema::serialize_gts;
pub use schema::strip_schema_metadata;
pub use schema_cast::GtsEntityCastResult;
pub use schema_cast::SchemaCastError;
pub use schema_narrow::NarrowError;
pub use schema_narrow::try_narrow;
pub use schema_refs::ExtractRefsError;
pub use schema_refs::InvalidRefReason;
pub use schema_refs::extract_gts_refs;
pub use schema_traits::GtsTraitsSchema;
pub use schema_traits::inline_traits_schema_of;
pub use store::GtsReader;
pub use store::GtsStore;
pub use store::GtsStoreQueryResult;
pub use store::ResolvedType;
pub use store::StoreError;
pub use x_gts_ref::XGtsRefValidationError;
pub use x_gts_ref::XGtsRefValidator;

Modules§

entities
files_reader
gts
GTS identifier types.
ops
path_resolver
schema
Runtime schema generation traits for GTS types.
schema_cast
schema_compat
OP#12 – Schema-vs-schema compatibility validation.
schema_modifiers
schema_narrow
Typed narrowing — go from a runtime-typed payload (commonly serde_json::Value) to a typed GTS view Q: GtsSchema, validating the runtime schema-id discriminator against the target’s <Q as GtsSchema>::innermost_type_id() and deserialising the payload into Q via [crate::GtsDeserializeWrapper].
schema_refs
schema_resolver
$ref resolution for registered GTS schemas: inlining gts:// and local #/ references into a self-contained body. A $ref target is inlined at a non-root position, so its root-only keys ($id/$schema and the x-gts-* type-level modifiers) are stripped on the way in. allOf and the other combinators are preserved verbatim — composition is left to the JSON Schema validator, not flattened here.
schema_traits
OP#13 – Schema Traits Validation (x-gts-traits-schema / x-gts-traits)
store
x_gts_ref

Macros§

gts_schema_for
Generate a GTS-style schema for a nested type with allOf and $ref to base.

Structs§

GtsId
GTS ID - a validated Global Type System identifier.
GtsIdError
Error from GTS identifier / wildcard parsing.
GtsIdPattern
A GTS identifier match pattern (exact or trailing-* wildcard).
GtsIdSegmentParts
The parsed name and version components shared by concrete and wildcard segments.
GtsUuidTail
A trailing anonymous-instance UUID (combined anonymous instance).

Enums§

GtsIdPatternSegment
A single segment of a parsed GTS identifier pattern.
GtsIdSegment
A single concrete ~-delimited segment of a parsed GTS identifier.

Constants§

DEFAULT_GTS_ID_PREFIX
The default identifier prefix for all GTS identifiers.
GTS_ID_MAX_LENGTH
Maximum allowed length for a GTS identifier string.
GTS_ID_PREFIX
The configured prefix for all GTS identifiers.
GTS_ID_PREFIX_ENV
Environment variable used to override the GTS identifier prefix at compile time.