Umbraco.Community.DeliveryApiExtensions
12.0.0
See the version list below for details.
dotnet add package Umbraco.Community.DeliveryApiExtensions --version 12.0.0
NuGet\Install-Package Umbraco.Community.DeliveryApiExtensions -Version 12.0.0
<PackageReference Include="Umbraco.Community.DeliveryApiExtensions" Version="12.0.0" />
paket add Umbraco.Community.DeliveryApiExtensions --version 12.0.0
#r "nuget: Umbraco.Community.DeliveryApiExtensions, 12.0.0"
// Install Umbraco.Community.DeliveryApiExtensions as a Cake Addin #addin nuget:?package=Umbraco.Community.DeliveryApiExtensions&version=12.0.0 // Install Umbraco.Community.DeliveryApiExtensions as a Cake Tool #tool nuget:?package=Umbraco.Community.DeliveryApiExtensions&version=12.0.0
Umbraco Delivery Api Extensions
Extensions for the Umbraco Delivery API.
Features ✨
Backoffice preview
Preview the Delivery API responses from the backoffice content/media nodes.
Typed swagger
Adds types to the Umbraco swagger based on your document and data types (just like Models Builder), so that you can more seamlessly generate typed clients.
Example of a Node console app using the types/functions generated by a typescript restful client generator using the typed swagger.
import { getContentItemByPath } from './api/umbraco-api';
const content = (await getContentItemByPath('/')).data;
// Content can be of any document type here
if (content.contentType === 'home') {
// By checking the contentType, Typescript knows this is a Home page
// and properly validates the properties and their types
console.log(`Name: ${content.name}`);
console.log(`Title: ${content.properties?.title}`);
console.log(`Text: ${content.properties?.text?.markup}`);
}
Installation 🧑💻
Add the package to an existing Umbraco website (v12.2+) from nuget:
dotnet add package Umbraco.Community.DeliveryApiExtensions
Configuration (appsettings.json)
{
"DeliveryApiExtensions": {
"Preview": {
"Enabled": true,
"Media": {
"Enabled": true
},
"AllowedUserGroupAliases": [], // All allowed by default
"ContentAppWeight": -50
},
"TypedSwagger": {
"Enabled": true,
"Mode": "Auto"
}
}
}
Typed swagger modes
Automatic (Auto) - Swagger will be generated with the
UseOneOfForPolymorphism
andUseAllOfForInheritance
options.
Suitable for most generators like openapi-typescript and orval.Compatibility - Swagger will be generated with only the
UseAllOfForInheritance
option enabled.
Suitable for generators that don't support polymorphism using OneOf like NSwag.Manual - Swagger options will not be configured, allowing full customization.
It can be configured from your codebase using:services.Configure<SwaggerGenOptions>(options => ...) services.Configure<TypedSwaggerOptions>(options => ...)
Contributing 🙌
Contributions to this package are most welcome! Please read the Contributing Guidelines.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net7.0
- Microsoft.OpenApi (>= 1.4.5)
- Umbraco.Cms.Api.Delivery (>= 12.2.0)
- Umbraco.Cms.Web.BackOffice (>= 12.2.0)
- Umbraco.Cms.Web.Website (>= 12.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
15.0.0 | 49 | 11/14/2024 |
15.0.0-beta.1 | 42 | 11/10/2024 |
14.0.0 | 111 | 11/10/2024 |
14.0.0-beta.1 | 406 | 7/28/2024 |
13.1.0 | 103 | 11/8/2024 |
13.0.0 | 12,981 | 12/16/2023 |
12.0.1 | 256 | 2/8/2024 |
12.0.0 | 474 | 12/6/2023 |