Skip to content

fix(schemas): shared schema types - #296

Merged
BenPinet merged 7 commits into
nextfrom
fix/shared_types
Nov 20, 2026
Merged

BenPinet merged 7 commits into
nextfrom
fix/shared_types

Conversation

@JulienChampagnol

@JulienChampagnol JulienChampagnol commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Summary

Uses the shared schema types of OpenGeodeWeb-Microservice (Geode-solutions/OpenGeodeWeb-Microservice#35).

  • Defines in src/opengeodeweb_back/schema_types.json, exported as @geode/opengeodeweb-back/schema_types and opengeodeweb_back.schema_types:
    • CRS, AttributeInfo, MeshComponent, CollectionComponent, only used by Back and the packages depending on it;
    • ViewerId, AttributeName, Filename, Point3D, also defined (identically) by Viewer.
  • Route schemas only name the shared types, e.g. "crs": {"title": "CRS"}: about 1800 duplicated lines removed. schema_definitions.json ships with the package so that the routes validate the full schemas at runtime.
  • The generated code names them: id: DataId, geode_id: GeodeId, filename: Filename instead of str.
  • geode_object_type is validated against the values of GeodeObjectType (an unknown type is a 400), and objects_to_load returns GeodeObjectType.
  • The CRS routes use the shared CRS dataclass.

Test plan

  • ruff and mypy clean
  • 172 tests pass, including a new 400 on an unknown geode object type
  • The combined JSON schemas are the same as with the full schemas
  • The wheel contains schema_definitions.json

🤖 Generated with Claude Code

JulienChampagnol and others added 6 commits November 19, 2026 15:15
They are only used by this package and the ones depending on it, which import
them from @geode/opengeodeweb-back/schema_types or opengeodeweb_back.schema_types.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
geode_object_type is now validated against the values of GeodeObjectType.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OpenGeodeWeb-Microservice only defines DataId and GeodeId.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants