Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IPropertyEditorSchemaService

    Provides services for querying property editor value schemas.

    Namespace: Umbraco.Cms.Core.Services
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IPropertyEditorSchemaService : IService
    Remarks

    This service enables retrieval of JSON Schema information for property editor values, supporting programmatic content creation, import validation, and tooling.

    Schema information is only available for property editors that implement IValueSchemaProvider.

    Methods

    View Source

    GetSchemaAsync(Guid)

    Gets the complete schema information for a specific data type, including both CLR type and JSON Schema.

    Declaration
    Task<Attempt<PropertyValueSchema, PropertyEditorSchemaOperationStatus>> GetSchemaAsync(Guid dataTypeKey)
    Parameters
    Type Name Description
    Guid dataTypeKey

    The unique key of the data type.

    Returns
    Type Description
    Task<Attempt<PropertyValueSchema, PropertyEditorSchemaOperationStatus>>

    An attempt containing the schema information with both CLR type and JSON Schema, or an appropriate operation status if the data type was not found or doesn't support schemas.

    View Source

    GetValueSchema(string, object?)

    Gets the JSON Schema for a property editor with the specified configuration.

    Declaration
    JsonObject? GetValueSchema(string propertyEditorAlias, object? configuration)
    Parameters
    Type Name Description
    string propertyEditorAlias

    The alias of the property editor.

    object configuration

    The configuration object for the data type.

    Returns
    Type Description
    JsonObject

    A JSON Schema (draft 2020-12), or null if the property editor doesn't implement IValueSchemaProvider.

    View Source

    GetValueType(string, object?)

    Gets the CLR type for a property editor with the specified configuration.

    Declaration
    Type? GetValueType(string propertyEditorAlias, object? configuration)
    Parameters
    Type Name Description
    string propertyEditorAlias

    The alias of the property editor.

    object configuration

    The configuration object for the data type.

    Returns
    Type Description
    Type

    The CLR type, or null if the property editor doesn't implement IValueSchemaProvider.

    View Source

    SupportsSchema(string)

    Checks whether a property editor supports schema information.

    Declaration
    bool SupportsSchema(string propertyEditorAlias)
    Parameters
    Type Name Description
    string propertyEditorAlias

    The alias of the property editor.

    Returns
    Type Description
    bool

    true if the editor implements IValueSchemaProvider; otherwise, false.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX