Skip to content

Fix typegen raising exception#105

Open
DevTGHa wants to merge 3 commits intofeature/base_class_refactorfrom
fix_type_gen_from_schema
Open

Fix typegen raising exception#105
DevTGHa wants to merge 3 commits intofeature/base_class_refactorfrom
fix_type_gen_from_schema

Conversation

@DevTGHa
Copy link
Copy Markdown
Collaborator

@DevTGHa DevTGHa commented Jan 12, 2026

Fix typegen raising exception

Summary

Type generation from pydantic model for the frontend was raising exception below.
This is fix for the issue.

  File "C:\dev\plugin\colourcal\backend\.venv\Lib\site-packages\pydantic\json_schema.py", line 2442, in handle_invalid_for_json_schema
    raise PydanticInvalidForJsonSchema(f'Cannot generate a JsonSchema for {error_info}')
pydantic.errors.PydanticInvalidForJsonSchema: Cannot generate a JsonSchema for core_schema.IsInstanceSchema (<class 'open_vp_cal.core.structures.ProcessingResults'>)

For further information visit https://errors.pydantic.dev/2.12/u/invalid-for-json-schema
Error: Failed to export OpenAPI schema

@DevTGHa DevTGHa self-assigned this Jan 12, 2026
@DevTGHa DevTGHa added the bug Something isn't working label Jan 12, 2026
serialize_nested cause a differece between generated datastructure
and actual json serialised datastructure.

Removing to resolve it.
@DevTGHa DevTGHa force-pushed the fix_type_gen_from_schema branch from 44da892 to 4f04344 Compare January 13, 2026 09:30
@DevTGHa DevTGHa requested a review from davisadam10 January 14, 2026 11:39
verification_wall: str = Field(default="")

# ===== Runtime Fields (excluded from serialization) =====
processing_results: ProcessingResults = Field(
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davisadam10 can I have these two _processing_results and _separation_results as private?
FastAPI backend endpoint keep raising exception due to these attribute being Field unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant