r3schema

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package r3schema serializes an r3.Schema to a stable, versioned, public-only JSON shape for introspection.

Category: Serialization dialect.

A consumer can expose the result (e.g. at a "/-/schema" endpoint) so a frontend can build column pickers and a dynamic "+ filter" UI from the declared attributes. The serialization is pure and stateless — it has no I/O and no state, matching the dialect contract.

Only the public projection is emitted: attributes without the Queryable capability are omitted, and the system/worker bypass is never advertised. The reserved "computed" flag is included from day one so the contract is forward-compatible.

Index

Constants

View Source
const Version = 1

Version is the schema-JSON contract version. Bump it on a breaking change to the emitted shape so consumers can detect and adapt.

Variables

This section is empty.

Functions

func MarshalSchema

func MarshalSchema(s r3.Schema) ([]byte, error)

MarshalSchema serializes a schema to the public JSON shape: a version plus the ordered list of Queryable attributes, each with its capability booleans, allowed filter operators (canonical names), enum values, relation target, and the reserved computed flag. Non-queryable attributes are omitted so the system/worker bypass is never advertised.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL