Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IContentTypeJsonSchemaService

    Provides services for generating JSON Schema for content types.

    Namespace: Umbraco.Cms.Api.Management.Services
    Assembly: Umbraco.Cms.Api.Management.dll
    Syntax
    public interface IContentTypeJsonSchemaService
    Remarks

    This service generates JSON Schema (draft 2020-12) that describes the structure of content creation payloads for specific content types (documents, media, members).

    The generated schemas reference data type schemas via external $ref URIs to the /umbraco/management/api/v1/data-type/{id}/schema endpoint. Tooling should resolve these references by making HTTP requests to the referenced endpoints.

    Methods

    View Source

    GetDocumentTypeSchemaAsync(Guid)

    Gets a JSON Schema for creating/updating documents of a specific document type.

    Declaration
    Task<JsonObject?> GetDocumentTypeSchemaAsync(Guid key)
    Parameters
    Type Name Description
    Guid key

    The unique key of the document type.

    Returns
    Type Description
    Task<JsonObject>

    A JSON Schema as a System.Text.Json.Nodes.JsonObject, or null if the document type was not found.

    View Source

    GetMediaTypeSchemaAsync(Guid)

    Gets a JSON Schema for creating/updating media of a specific media type.

    Declaration
    Task<JsonObject?> GetMediaTypeSchemaAsync(Guid key)
    Parameters
    Type Name Description
    Guid key

    The unique key of the media type.

    Returns
    Type Description
    Task<JsonObject>

    A JSON Schema as a System.Text.Json.Nodes.JsonObject, or null if the media type was not found.

    View Source

    GetMemberTypeSchemaAsync(Guid)

    Gets a JSON Schema for creating/updating members of a specific member type.

    Declaration
    Task<JsonObject?> GetMemberTypeSchemaAsync(Guid key)
    Parameters
    Type Name Description
    Guid key

    The unique key of the member type.

    Returns
    Type Description
    Task<JsonObject>

    A JSON Schema as a System.Text.Json.Nodes.JsonObject, or null if the member type was not found.

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