We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f9b4423 commit f3388f0Copy full SHA for f3388f0
examples/json_schema.py
@@ -0,0 +1,23 @@
1
+#!/usr/bin/env python
2
+import json
3
+import sys
4
+
5
+from robotpy_build.config.autowrap_yml import AutowrapConfigYaml
6
7
+schema = AutowrapConfigYaml.schema()
8
+nullable_types = (
9
+ "PropData",
10
+ "ClassData",
11
+ "EnumData",
12
+ "FunctionData",
13
+)
14
15
+for name, definition in schema["definitions"].items():
16
+ if (
17
+ name in nullable_types
18
+ and definition["type"] == "object"
19
+ and "default" not in definition
20
+ ):
21
+ definition["type"] = ["object", "null"]
22
23
+json.dump(schema, sys.stdout, indent="\t")
0 commit comments