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 SourceGetDocumentTypeSchemaAsync(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 |
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 |
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 |