Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix(programs): fix linting in examples
Signed-off-by: karan-palan <[email protected]>
  • Loading branch information
Karan-Palan committed Oct 13, 2025
commit 72c7df1a7b30a21d906695745b7b6cced9e8f7df
155 changes: 63 additions & 92 deletions test/programs/annotation-default/schema.json
Original file line number Diff line number Diff line change
@@ -1,95 +1,66 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"varBoolean": {
"default": true,
"type": "boolean"
},
"varBooleanArray": {
"default": [
true,
false,
true
],
"items": {
"type": "boolean"
},
"type": "array"
},
"varFloat": {
"default": 3.21,
"type": "number"
},
"varFloatArray": {
"default": [
1.23,
65.21,
-123.4,
0,
1000000.0001
],
"items": {
"type": "number"
},
"type": "array"
},
"varInteger": {
"default": 123,
"type": "number"
},
"varIntegerArray": {
"default": [
1,
2,
3,
4,
5
],
"items": {
"type": "number"
},
"type": "array"
},
"varMixedArray": {
"default": [
true,
123,
3.21,
"foo"
],
"items": {
},
"type": "array"
},
"varString": {
"default": "foo",
"type": "string"
},
"varStringArray": {
"default": [
"a",
"b",
"c",
"..."
],
"items": {
"type": "string"
},
"type": "array"
}
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"varBoolean": {
"default": true,
"type": "boolean"
},
"required": [
"varBoolean",
"varBooleanArray",
"varFloat",
"varFloatArray",
"varInteger",
"varIntegerArray",
"varMixedArray",
"varString",
"varStringArray"
],
"type": "object"
"varBooleanArray": {
"default": [ true, false, true ],
"items": {
"type": "boolean"
},
"type": "array"
},
"varFloat": {
"default": 3.21,
"type": "number"
},
"varFloatArray": {
"default": [ 1.23, 65.21, -123.4, 0, 1e+06 ],
"items": {
"type": "number"
},
"type": "array"
},
"varInteger": {
"default": 123,
"type": "number"
},
"varIntegerArray": {
"default": [ 1, 2, 3, 4, 5 ],
"items": {
"type": "number"
},
"type": "array"
},
"varMixedArray": {
"default": [ true, 123, 3.21, "foo" ],
"type": "array"
},
"varString": {
"default": "foo",
"type": "string"
},
"varStringArray": {
"default": [ "a", "b", "c", "..." ],
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"varBoolean",
"varBooleanArray",
"varFloat",
"varFloatArray",
"varInteger",
"varIntegerArray",
"varMixedArray",
"varString",
"varStringArray"
],
"type": "object"
}

12 changes: 4 additions & 8 deletions test/programs/annotation-required/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"type": "string"
}
},
"required": ["age", "name"],
"required": [ "age", "name" ],
"type": "object"
},
"MySubObject": {
Expand All @@ -25,8 +25,6 @@
"type": "boolean"
},
"object": {
"additionalProperties": true,
"properties": {},
"type": "object"
},
"string": {
Expand All @@ -45,7 +43,7 @@
]
}
},
"required": ["bool", "object", "string"],
"required": [ "bool", "object", "string" ],
"type": "object"
},
"MySubObject2": {
Expand All @@ -55,15 +53,13 @@
"type": "boolean"
},
"object": {
"additionalProperties": true,
"properties": {},
"type": "object"
},
"string": {
"type": "string"
}
},
"required": ["bool", "object", "string"],
"required": [ "bool", "object", "string" ],
"type": "object"
}
},
Expand All @@ -89,6 +85,6 @@
]
}
},
"required": ["defaultObject", "filled"],
"required": [ "defaultObject", "filled" ],
"type": "object"
}
175 changes: 85 additions & 90 deletions test/programs/annotation-tjs/schema.json
Original file line number Diff line number Diff line change
@@ -1,93 +1,88 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"dateTime": {
"format": "date-time",
"type": "string"
},
"email": {
"format": "email",
"type": "string"
},
"examples": {
"examples": [
"foo",
1
],
"type": "string"
},
"hostname": {
"format": "hostname",
"type": "string"
},
"ipv4": {
"format": "ipv4",
"type": "string"
},
"ipv6": {
"format": "ipv6",
"type": "string"
},
"jsonPointer": {
"format": "json-pointer",
"type": "string"
},
"oneCharacter": {
"minimum": 5,
"type": "number"
},
"regexPattern": {
"pattern": "^[a-zA-Z0-9]{4}-abc_123$",
"type": "string"
},
"regexPatternWithWhitespace": {
"pattern": "^[a-zA-Z0-9]{4}-abc_123$",
"type": "string"
},
"uri": {
"format": "uri",
"type": "string"
},
"uriReference": {
"format": "uri-reference",
"type": "string"
},
"uriTemplate": {
"format": "uri-template",
"type": "string"
},
"booleanAnnotationDefaultValue": {
"hide": true,
"type": "string"
},
"booleanAnnotationWithTrue": {
"hide": true,
"type": "string"
},
"booleanAnnotationWithFalse": {
"hide": false,
"type": "string"
}
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"dateTime": {
"format": "date-time",
"type": "string"
},
"required": [
"booleanAnnotationDefaultValue",
"booleanAnnotationWithFalse",
"booleanAnnotationWithTrue",
"dateTime",
"email",
"examples",
"hostname",
"ipv4",
"ipv6",
"jsonPointer",
"oneCharacter",
"regexPattern",
"regexPatternWithWhitespace",
"uri",
"uriReference",
"uriTemplate"
],
"type": "object"
"email": {
"format": "email",
"type": "string"
},
"examples": {
"type": "string"
},
"hostname": {
"format": "hostname",
"type": "string"
},
"ipv4": {
"format": "ipv4",
"type": "string"
},
"ipv6": {
"format": "ipv6",
"type": "string"
},
"jsonPointer": {
"format": "json-pointer",
"type": "string"
},
"oneCharacter": {
"minimum": 5,
"type": "number"
},
"regexPattern": {
"pattern": "^[a-zA-Z0-9]{4}-abc_123$",
"type": "string"
},
"regexPatternWithWhitespace": {
"pattern": "^[a-zA-Z0-9]{4}-abc_123$",
"type": "string"
},
"uri": {
"format": "uri",
"type": "string"
},
"uriReference": {
"format": "uri-reference",
"type": "string"
},
"uriTemplate": {
"format": "uri-template",
"type": "string"
},
"booleanAnnotationDefaultValue": {
"x-hide": true,
"type": "string"
},
"booleanAnnotationWithTrue": {
"x-hide": true,
"type": "string"
},
"booleanAnnotationWithFalse": {
"x-hide": false,
"type": "string"
}
},
"required": [
"booleanAnnotationDefaultValue",
"booleanAnnotationWithFalse",
"booleanAnnotationWithTrue",
"dateTime",
"email",
"examples",
"hostname",
"ipv4",
"ipv6",
"jsonPointer",
"oneCharacter",
"regexPattern",
"regexPatternWithWhitespace",
"uri",
"uriReference",
"uriTemplate"
],
"type": "object"
}

Loading