Commit Graph
4 Commits
Author SHA1 Message Date
apairon 21472bdc72 Schema: ngram.sizes auf 2–10 begrenzen, combinedCache ergänzen
continuous-integration/drone/push Build is passing
Die Gesamtabnahme fand zwei Lücken im Config-Vertrag:

- ngram.sizes erlaubte minimum 1 und hatte kein maximum; der Server akzeptiert
  nur 2–10 (collection_setup.go) — das Schema ließ also Configs durch, die beim
  Projektload scheitern.
- combinedCache fehlte komplett, obwohl Server (models.CombinedCacheConfig) und
  Doku den Block als Projekt-YAML führen; additionalProperties:false lehnte
  gültige, dokumentierte Configs ab.

Ergänzt in collection.schema.json und index.d.ts (CombinedCacheConfig mit
enabled/ttl/maxEntries). Die Demo-Collection ngram-stopwords.yml enthält jetzt
eine Combined-Config mit combinedCache, sodass validate:schemas den Block
abdeckt. Gegenprobe per AJV: sizes [1] und [11] werden abgelehnt, [2,3] und
combinedCache akzeptiert.
2026-10-19 22:34:56 +00:00
apairon 9e12a8e9c3 Schema: ngram.stopwords, queryFilter und inMemory ergänzen
continuous-integration/drone/push Build is passing
Der Config-Vertrag kannte nur sizes und normalize. Damit lehnte
`validate:schemas` jedes Projekt ab, das die bereits im Server vorhandenen
ngram-Optionen nutzt (additionalProperties: false), und die generierte
Schema-Referenz konnte sie nie zeigen.

Ergänzt in collection.schema.json und index.d.ts:

- stopwords: { presets?: string[], words?: string[] }
- queryFilter: { minMatchRatio?: 0..1 }
- inMemory: { enabled?, maxDocs?, maxMemoryMB? }

plus demo-api/collections/ngram-stopwords.yml als Validierungs-Fixture; ohne
Schema-Erweiterung schlägt validate:schemas dort mit "must NOT have additional
properties" fehl.
2026-10-19 20:48:10 +00:00
apairon 1de0d67992 fix(schema): add cors to collection and action schemas 2026-09-21 16:47:03 +00:00
apairon 40b441df04 ✨ feat: add new JSON schemas for Tibi configuration including fields, hooks, jobs, and permissions
- Introduced `field-list.schema.json`, `field-meta.schema.json`, and `field.schema.json` for field configurations.
- Added `hooks.schema.json` for defining hooks in the Tibi project.
- Created `image-filter.schema.json` for image processing configurations.
- Implemented `job.schema.json` for job scheduling configurations.
- Added `openapi.schema.json` for OpenAPI metadata generation.
- Introduced `permissions.schema.json` for managing permissions in the project.
- Created `project.schema.json` for overall project configuration.
- Added `projections.schema.json` for defining projections in the project.
- Implemented a validation script `validate-schemas.mjs` to ensure schema compliance.
2026-07-01 09:23:43 +00:00