Skip to content

Commit 8d808e6

Browse files
committed
chore: update the jsonschema module
Signed-off-by: peefy <[email protected]>
1 parent 9c6d4dc commit 8d808e6

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

jsonschema/kcl.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
22
name = "jsonschema"
3-
version = "0.0.4"
3+
version = "0.0.5"
44
description = "`jsonschema` is a module for the JSON schema definition using KCL"
55

jsonschema/ty.k

+1-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
type JSONSchemaType = 'string' | 'number' | 'integer' | 'bool' | 'null' | 'array' | 'object'
33

44
schema JSONSchema:
5-
[n: ...str]: str
65
id?: str
76
"$id"?: str
87
"$schema"?: str
8+
"$ref"?: str
99
type?: JSONSchemaType | JSONSchemaType[]
1010
title?: str
1111
default?: any
@@ -84,9 +84,6 @@ schema JSONSchema:
8484
allowComments?: bool
8585
allowTrailingCommas?: bool
8686

87-
check:
88-
n in ["$id", "$schema", "$ref"], "additional attributes must be in $id and $schema"
89-
9087
schema JSONSchemaMap:
9188
[name: str]: JSONSchema
9289

jsonschema/ty_test.k

+1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ test_jsonschema = lambda {
33
"$schema" = "https://json-schema.org/draft/2020-12/schema"
44
"$id" = "https://myid"
55
}
6+
assert json_schema["$id"] == "https://myid"
67
}

0 commit comments

Comments
 (0)