fix adapters, handle entity enum more gracefully

This commit is contained in:
dswbx
2025-06-12 10:24:50 +02:00
parent fc513bb413
commit d5bb6ffa61
5 changed files with 13 additions and 7 deletions

View File

@@ -51,6 +51,7 @@ export class Controller {
protected getEntitiesEnum(em: EntityManager<any>) {
const entities = em.entities.map((e) => e.name);
return entities.length > 0 ? s.string({ enum: entities }) : s.string();
// @todo: current workaround to allow strings (sometimes building is not fast enough to get the entities)
return entities.length > 0 ? s.anyOf([s.string({ enum: entities }), s.string()]) : s.string();
}
}