fix(jambo): Fix allOf, anyOf, null and array type parsing #33
@@ -1,5 +1,3 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from jambo.parser import GenericTypeParser
|
||||
from jambo.types.type_parser_options import TypeParserOptions
|
||||
|
||||
|
||||
@@ -35,17 +35,17 @@ class JSONSchema(TypedDict, total=False):
|
||||
|
|
||||
type: JSONSchemaType | list[JSONSchemaType]
|
||||
|
||||
# Object-specific keywords
|
||||
properties: dict[str, "JSONSchema"]
|
||||
|
A large change with little impact, is there a necessity for this change? A large change with little impact, is there a necessity for this change?
|
||||
properties: dict[str, JSONSchema]
|
||||
|
A large change with little impact, is there a necessity for this change? A large change with little impact, is there a necessity for this change?
|
||||
required: list[str]
|
||||
additionalProperties: bool | "JSONSchema"
|
||||
|
A large change with little impact, is there a necessity for this change? A large change with little impact, is there a necessity for this change?
|
||||
additionalProperties: bool | JSONSchema
|
||||
|
A large change with little impact, is there a necessity for this change? A large change with little impact, is there a necessity for this change?
|
||||
minProperties: int
|
||||
maxProperties: int
|
||||
patternProperties: dict[str, "JSONSchema"]
|
||||
|
A large change with little impact, is there a necessity for this change? A large change with little impact, is there a necessity for this change?
|
||||
dependencies: dict[str, list[str] | "JSONSchema"]
|
||||
|
A large change with little impact, is there a necessity for this change? A large change with little impact, is there a necessity for this change?
|
||||
patternProperties: dict[str, JSONSchema]
|
||||
|
A large change with little impact, is there a necessity for this change? A large change with little impact, is there a necessity for this change?
|
||||
dependencies: dict[str, list[str] | JSONSchema]
|
||||
|
A large change with little impact, is there a necessity for this change? A large change with little impact, is there a necessity for this change?
|
||||
|
||||
# Array-specific keywords
|
||||
items: "JSONSchema" | list["JSONSchema"]
|
||||
|
A large change with little impact, is there a necessity for this change? A large change with little impact, is there a necessity for this change?
|
||||
additionalItems: bool | "JSONSchema"
|
||||
|
A large change with little impact, is there a necessity for this change? A large change with little impact, is there a necessity for this change?
|
||||
items: JSONSchema | list[JSONSchema]
|
||||
|
A large change with little impact, is there a necessity for this change? A large change with little impact, is there a necessity for this change?
|
||||
additionalItems: bool | JSONSchema
|
||||
|
A large change with little impact, is there a necessity for this change? A large change with little impact, is there a necessity for this change?
|
||||
minItems: int
|
||||
maxItems: int
|
||||
uniqueItems: bool
|
||||
@@ -68,15 +68,15 @@ class JSONSchema(TypedDict, total=False):
|
||||
|
A large change with little impact, is there a necessity for this change? A large change with little impact, is there a necessity for this change?
A large change with little impact, is there a necessity for this change? A large change with little impact, is there a necessity for this change?
|
||||
const: JSONType
|
||||
|
||||
# Conditionals
|
||||
if_: "JSONSchema" # 'if' is a reserved word in Python
|
||||
|
A large change with little impact, is there a necessity for this change? A large change with little impact, is there a necessity for this change?
|
||||
then: "JSONSchema"
|
||||
|
A large change with little impact, is there a necessity for this change? A large change with little impact, is there a necessity for this change?
|
||||
else_: "JSONSchema" # 'else' is also a reserved word
|
||||
|
A large change with little impact, is there a necessity for this change? A large change with little impact, is there a necessity for this change?
|
||||
if_: JSONSchema # 'if' is a reserved word in Python
|
||||
|
A large change with little impact, is there a necessity for this change? A large change with little impact, is there a necessity for this change?
|
||||
then: JSONSchema
|
||||
|
A large change with little impact, is there a necessity for this change? A large change with little impact, is there a necessity for this change?
|
||||
else_: JSONSchema # 'else' is also a reserved word
|
||||
|
A large change with little impact, is there a necessity for this change? A large change with little impact, is there a necessity for this change?
|
||||
|
||||
# Combination keywords
|
||||
allOf: list["JSONSchema"]
|
||||
|
A large change with little impact, is there a necessity for this change? A large change with little impact, is there a necessity for this change?
|
||||
anyOf: list["JSONSchema"]
|
||||
|
A large change with little impact, is there a necessity for this change? A large change with little impact, is there a necessity for this change?
|
||||
oneOf: list["JSONSchema"]
|
||||
|
A large change with little impact, is there a necessity for this change? A large change with little impact, is there a necessity for this change?
|
||||
not_: "JSONSchema" # 'not' is a reserved word
|
||||
|
A large change with little impact, is there a necessity for this change? A large change with little impact, is there a necessity for this change?
|
||||
allOf: list[JSONSchema]
|
||||
|
A large change with little impact, is there a necessity for this change? A large change with little impact, is there a necessity for this change?
|
||||
anyOf: list[JSONSchema]
|
||||
|
A large change with little impact, is there a necessity for this change? A large change with little impact, is there a necessity for this change?
|
||||
oneOf: list[JSONSchema]
|
||||
|
A large change with little impact, is there a necessity for this change? A large change with little impact, is there a necessity for this change?
|
||||
not_: JSONSchema # 'not' is a reserved word
|
||||
|
A large change with little impact, is there a necessity for this change? A large change with little impact, is there a necessity for this change?
|
||||
|
||||
|
||||
# Fix forward references
|
||||
|
||||
|
A large change with little impact, is there a necessity for this change? A large change with little impact, is there a necessity for this change?
A large change with little impact, is there a necessity for this change? A large change with little impact, is there a necessity for this change?
|
||||
A large change with little impact, is there a necessity for this change?
A large change with little impact, is there a necessity for this change?