Skip to content

AI-assisted schema editing handling of references #1022

Description

@Logende

In AI-assisted schema editing it is possible to select an element of the schema and only use the AI-assistance on this sub-schema to edit it. Then only the sub-schema is sent to LLM too. However, if the LLM comes up with new $defs, it will put it into this sub-schema too, not knowing there is more to the schema than this. For this case we need a utility, which detects whether the sub-schema got a $defs or definitions field generated and extracts it into the overall schema root, avoiding duplication and adjusting the name in case of duplication (e.g., by a numerical suffix which is counting up). After extraction of this definition, the new path of the definition must be known (if using the existing function to add new definitions, which already has duplication handling, it returns a Path element as return object). In the generated/edited sub-schema then all $ref to the old definitions path must be updated with the new one, based on where the definition was moved to.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions