etre icon indicating copy to clipboard operation
etre copied to clipboard

Add entity type schemas

Open jemiahw opened this issue 4 months ago • 1 comments

Users can now define a schema for entity types, including validation rules and indexing. New API endpoints have been added to fetch a list of entity types and schemas.

jemiahw avatar Nov 11 '25 18:11 jemiahw

I copied the schema code from block-etre and made a few changes along the way. The main changes are:

  • In the configuration, I renamed from validations->schema

  • Renamed the validations package to schema This keeps naming a little more consistent.

  • API endpoint for schemas returns the configured schema, not the Mongo DB schema This is simpler to implement and keeps us database agnostic. If we swapped out MongoDB for something else, the schema endpoint would not change. Also, it lets us easily add description or other fields to the config, that can then be returned in the payload.

  • Added an API endpoint to list all entity types This is mostly for convenience and prepping for an eventual MCP. Its handy to be able to discover the entity types.

jemiahw avatar Nov 11 '25 22:11 jemiahw