Umbraco.Community.DeliveryApiExtensions 15.0.1

dotnet add package Umbraco.Community.DeliveryApiExtensions --version 15.0.1
                    
NuGet\Install-Package Umbraco.Community.DeliveryApiExtensions -Version 15.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Umbraco.Community.DeliveryApiExtensions" Version="15.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Umbraco.Community.DeliveryApiExtensions" Version="15.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Umbraco.Community.DeliveryApiExtensions" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Umbraco.Community.DeliveryApiExtensions --version 15.0.1
                    
#r "nuget: Umbraco.Community.DeliveryApiExtensions, 15.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Umbraco.Community.DeliveryApiExtensions&version=15.0.1
                    
Install Umbraco.Community.DeliveryApiExtensions as a Cake Addin
#tool nuget:?package=Umbraco.Community.DeliveryApiExtensions&version=15.0.1
                    
Install Umbraco.Community.DeliveryApiExtensions as a Cake Tool

Package Logo

Umbraco Delivery Api Extensions

Downloads NuGet GitHub license

Extensions for the Umbraco Delivery API.

Features ✨

Backoffice preview

Preview the Delivery API responses from the backoffice content/media nodes.

Preview

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}`);
}

Typed Swagger

Installation 🧑‍💻

Add the package to an existing Umbraco website (v12.2+) from nuget:

dotnet add package Umbraco.Community.DeliveryApiExtensions

Configuration (appsettings.json)

The following represents the default configuration, which can optionally be overriden by defining it in your own app settings.

{
  "DeliveryApiExtensions": {
    "Preview": {
      "Enabled": true,
      "Media": {
        "Enabled": true
      },
      "AllowedUserGroupAliases": [], // All allowed by default
    },
    "TypedSwagger": {
      "Enabled": true,
      "Mode": "Auto"
    }
  }
}

Typed swagger modes

  • Automatic (Auto) - Swagger will be generated with the UseOneOfForPolymorphism and UseAllOfForInheritance 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 Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.1 2,595 12/7/2024
15.0.0 515 11/14/2024
15.0.0-beta.1 67 11/10/2024
14.0.1 128 12/7/2024
14.0.0 843 11/10/2024
14.0.0-beta.1 456 7/28/2024
13.1.1 4,553 12/7/2024
13.1.1-beta.1 55 11/30/2024
13.1.0 1,191 11/8/2024
13.0.0 18,178 12/16/2023
12.0.1 280 2/8/2024
12.0.0 516 12/6/2023