Skip to content

Commit

Permalink
Fix schema generation
Browse files Browse the repository at this point in the history
  • Loading branch information
disrupted committed Jun 12, 2024
1 parent 54a2581 commit 3767c30
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions kpops/utils/gen_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,10 @@ def gen_pipeline_schema(
default=component.type,
)
core_schema: DefinitionsSchema = component.__pydantic_core_schema__ # pyright:ignore[reportAssignmentType]

model_schema: ModelFieldsSchema = core_schema["schema"]["schema"]["schema"] # pyright:ignore[reportGeneralTypeIssues,reportTypedDictNotRequiredAccess,reportAssignmentType]
schema = core_schema
while "schema" in schema:
schema = schema["schema"]
model_schema: ModelFieldsSchema = schema # pyright:ignore[reportAssignmentType]
model_schema["fields"]["type"] = ModelField(
type="model-field",
schema=LiteralSchema(
Expand Down

0 comments on commit 3767c30

Please sign in to comment.