Skip to content

SO Model version: add support for schema #152994

@pgayvallet

Description

@pgayvallet

We need to port an equivalent to the existing schemas type property for model versions:

/**
* An optional schema that can be used to validate the attributes of the type.
*
* When provided, calls to {@link SavedObjectsClient.create | create} will be validated against this schema.
*
* See {@link SavedObjectsValidationMap} for more details.
*/
schemas?: SavedObjectsValidationMap | (() => SavedObjectsValidationMap);

We should probably do that by adding a schema property to SavedObjectsModelVersion

export interface SavedObjectsModelVersion {
/**
* The {@link SavedObjectsModelChange | changes} associated with this version.
*/
modelChange: SavedObjectsModelChange;
}

So that the schema is more explicitly coupled with a given version.

Should probably be optional as it already was before model versions

Metadata

Metadata

Assignees

Labels

Epic:ZDTmigrationsZero downtime migrationsFeature:Saved ObjectsTeam:CorePlatform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t//

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions