fix(GIT-1358): Fix extend-schema property visibility and allOf composition#1398
Merged
Merged
Conversation
Completes the extend → allOf migration so creating an extended schema, saving it, and adding objects against it all work correctly. schema.types.ts / EditSchema.vue / SchemaMapper.php (in-flight): Replace deprecated single-parent `extend?: string` with JSON-Schema- standard composition fields `allOf?/oneOf?/anyOf?: string[]`. Update the extend-schema button to emit `allOf: [parentId]` and clean the PHP doc comment that still referenced `extend`. src/entities/schema/schema.ts: The TypeScript Schema entity dropped allOf/oneOf/anyOf in its constructor, so `setSchemaItem(new Schema(payload))` stripped the parent reference before it ever reached the API. Add the three fields to the class and copy them through. src/modals/object/ViewObject.vue: When adding an object against a composed schema, the form was empty because `schemaStore.schemaItem` came from the schema list endpoint, which does not run resolveSchemaExtension and therefore returns empty `properties`. Refetch the active schema by id (mounted, and in the currentSchema watcher) when it has allOf/oneOf/anyOf but no resolved properties — the detail endpoint merges parent properties in. A guard on (composition refs && propsCount === 0) prevents recursion once the resolved version arrives.
SudoThijn
approved these changes
May 1, 2026
Contributor
Quality Report — ConductionNL/openregister @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| composer | ✅ | ✅ 147/147 | |||
| npm | ✅ | ✅ 598/598 | |||
| PHPUnit | ❌ | ||||
| Newman | ❌ | ||||
| Playwright | ⏭️ |
Quality workflow — 2026-05-01 19:21 UTC
Download the full PDF report from the workflow artifacts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Completes the extend-schema feature (GIT-1358) by migrating from the deprecated
extendfield to JSON-Schema-standardallOfcomposition, and ensures thatproperties inherited from parent schemas are visible throughout the UI wherever
objects are viewed, edited, or searched.
Changes
Schema type definitions (
schema.types.ts,schema.ts)extend?: stringfield with three JSON Schema compositionfields:
allOf?: string[],oneOf?: string[],anyOf?: string[].Schemaentity class so they survivenew Schema(payload)construction and are not silently stripped before reachingthe API.
Schema mapper (
lib/Db/SchemaMapper.php)extendfield, keeping the doc accurate with the three standard composition fields.
Edit schema modal (
src/modals/schema/EditSchema.vue)allOf: [parentId]instead ofextend: parentId.computedInheritedPropertiescomputed property that walksallOfreferences and merges the parent schema's properties. These are passed as
inherited-propertiesto the form dialog so the editor can display parentproperties alongside own ones.
View object modal (
src/modals/object/ViewObject.vue)currentSchemacomputed property now merges inherited properties from allallOfparent schemas into the returned schema object, so the object form showsthe full property set (own + inherited) rather than just the child's own
(typically empty) properties.
mountedand in thecurrentSchemawatcher: when the active schema usescomposition but has zero resolved properties (schema-list endpoint returns raw
unresolved schemas), the code now automatically refetches the schema via the
detail endpoint, which triggers the backend's
resolveSchemaExtensionandreturns the fully merged schema. A guard prevents infinite re-fetching.
Schema store (
src/store/modules/schema.js)idfield is now omittedentirely from the request body so the backend unambiguously treats it as a
create rather than an update with an empty id. This fixed the security/roles
tab breaking on new schema creation.
Search sidebar (
src/sidebars/search/SearchSideBar.vue)resolveInheritedProperties(schema)helper that mergesallOfparent properties into a schema's own properties.
schemaOptions(schema picker) and indiscoverFacetsso facetfiltering and column display respect inherited fields from extended schemas.
Search index view (
src/views/search/SearchIndex.vue)normalizedSchemacomputed property now merges inherited properties fromallOfparents before normalizingordervalues, ensuring extended schemasexpose all columns in the search result table.
Behaviour after this fix
extend: id, stripped by Schema entityallOf: [id], preserved end-to-endid: "", causing backend erroridomitted on create; security tab works correctly