Remove the Timestamp kind
The Timestamp kind was a residual from an early research reference. It was byte-identical to String everywhere (length-prefixed UTF-8) and its only distinguishing behavior was a hand-rolled non-strict RFC 3339 check that the docs admitted was incomplete (Feb 31 passes, seconds range unchecked, no leap seconds). JSON-level timestamp validation is jsonschema's job (format: date-time on the validate_json path), not alktype's. Removes the AlkTypeKind::Timestamp variant, its to_bast_str/from_bast_str mapping, the builder's Schema::timestamp() constructor, the validate_timestamp/is_rfc3339_timestamp validator arms, and the materializer/reader/engine timestamp arms. Updates the meta-schema primitive enum (14 -> 13), the spec docs (bast-format.md, schema-layer.md, builder.md, validation.md, overview.md, data-access.md, README.md), and the kind-count references (19 -> 18). Verification: cargo test --release (407 pass), cargo clippy --all-targets -- -D warnings (clean), cargo doc --no-deps (clean), cargo build --target wasm32-unknown-unknown --release (clean).
This commit is contained in:
1 parent
62ed009281
commit
510553d800
17 files changed
+38
-225
No files matched your search
@@ -170,10 +170,6 @@ impl Schema {
|
||||
pub fn bytes() -> Self {
|
||||
Self::primitive(AlkTypeKind::Bytes)
|
||||
}
|
||||
/// BAST `timestamp` (length-prefixed RFC 3339 string).
|
||||
pub fn timestamp() -> Self {
|
||||
Self::primitive(AlkTypeKind::Timestamp)
|
||||
}
|
||||
|
||||
fn primitive(kind: AlkTypeKind) -> Self {
|
||||
Self {
|
||||
@@ -837,7 +833,6 @@ mod tests {
|
||||
assert_eq!(Schema::boolean().build(), json!("bool"));
|
||||
assert_eq!(Schema::string().build(), json!("string"));
|
||||
assert_eq!(Schema::bytes().build(), json!("bytes"));
|
||||
assert_eq!(Schema::timestamp().build(), json!("timestamp"));
|
||||
}
|
||||
|
||||
// ----- Struct -------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user