fix(jambo): Fix allOf, anyOf, null and array type parsing #33

Closed
thommann wants to merge 10 commits from main into main
2 changed files with 13 additions and 15 deletions
Showing only changes of commit 545ec8dda7 - Show all commits

View File

@@ -1,5 +1,3 @@
from __future__ import annotations
from jambo.parser import GenericTypeParser
from jambo.types.type_parser_options import TypeParserOptions

View File

@@ -35,17 +35,17 @@ class JSONSchema(TypedDict, total=False):
HideyoshiNakazone commented 2025-08-19 03:24:56 +00:00 (Migrated from github.com)
Review

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?
HideyoshiNakazone commented 2025-08-19 03:24:56 +00:00 (Migrated from github.com)
Review

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?
type: JSONSchemaType | list[JSONSchemaType]
# Object-specific keywords
properties: dict[str, "JSONSchema"]
HideyoshiNakazone commented 2025-08-19 03:24:56 +00:00 (Migrated from github.com)
Review

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]
HideyoshiNakazone commented 2025-08-19 03:24:56 +00:00 (Migrated from github.com)
Review

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"
HideyoshiNakazone commented 2025-08-19 03:24:56 +00:00 (Migrated from github.com)
Review

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
HideyoshiNakazone commented 2025-08-19 03:24:56 +00:00 (Migrated from github.com)
Review

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"]
HideyoshiNakazone commented 2025-08-19 03:24:56 +00:00 (Migrated from github.com)
Review

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"]
HideyoshiNakazone commented 2025-08-19 03:24:56 +00:00 (Migrated from github.com)
Review

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]
HideyoshiNakazone commented 2025-08-19 03:24:56 +00:00 (Migrated from github.com)
Review

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]
HideyoshiNakazone commented 2025-08-19 03:24:56 +00:00 (Migrated from github.com)
Review

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"]
HideyoshiNakazone commented 2025-08-19 03:24:56 +00:00 (Migrated from github.com)
Review

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"
HideyoshiNakazone commented 2025-08-19 03:24:56 +00:00 (Migrated from github.com)
Review

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]
HideyoshiNakazone commented 2025-08-19 03:24:56 +00:00 (Migrated from github.com)
Review

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
HideyoshiNakazone commented 2025-08-19 03:24:56 +00:00 (Migrated from github.com)
Review

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):
HideyoshiNakazone commented 2025-08-19 03:24:56 +00:00 (Migrated from github.com)
Review

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?
HideyoshiNakazone commented 2025-08-19 03:24:56 +00:00 (Migrated from github.com)
Review

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
HideyoshiNakazone commented 2025-08-19 03:24:56 +00:00 (Migrated from github.com)
Review

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"
HideyoshiNakazone commented 2025-08-19 03:24:56 +00:00 (Migrated from github.com)
Review

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
HideyoshiNakazone commented 2025-08-19 03:24:56 +00:00 (Migrated from github.com)
Review

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
HideyoshiNakazone commented 2025-08-19 03:24:56 +00:00 (Migrated from github.com)
Review

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
HideyoshiNakazone commented 2025-08-19 03:24:56 +00:00 (Migrated from github.com)
Review

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
HideyoshiNakazone commented 2025-08-19 03:24:56 +00:00 (Migrated from github.com)
Review

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"]
HideyoshiNakazone commented 2025-08-19 03:24:56 +00:00 (Migrated from github.com)
Review

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"]
HideyoshiNakazone commented 2025-08-19 03:24:56 +00:00 (Migrated from github.com)
Review

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"]
HideyoshiNakazone commented 2025-08-19 03:24:56 +00:00 (Migrated from github.com)
Review

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
HideyoshiNakazone commented 2025-08-19 03:24:56 +00:00 (Migrated from github.com)
Review

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]
HideyoshiNakazone commented 2025-08-19 03:24:56 +00:00 (Migrated from github.com)
Review

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]
HideyoshiNakazone commented 2025-08-19 03:24:56 +00:00 (Migrated from github.com)
Review

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]
HideyoshiNakazone commented 2025-08-19 03:24:56 +00:00 (Migrated from github.com)
Review

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
HideyoshiNakazone commented 2025-08-19 03:24:56 +00:00 (Migrated from github.com)
Review

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
HideyoshiNakazone commented 2025-08-19 03:24:56 +00:00 (Migrated from github.com)
Review

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?
HideyoshiNakazone commented 2025-08-19 03:24:56 +00:00 (Migrated from github.com)
Review

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?