Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
eaccc2a
Update documentation for Microsoft.AspNetCore.OpenApi
lauraneto Dec 19, 2025
ef567f7
Add Umbraco 18 upgrade notes for OpenAPI changes
lauraneto Dec 19, 2025
c61c752
Add documentation for ExcludeFromDefaultOpenApiDocument attribute
lauraneto Jan 6, 2026
431a75e
Fix OpenAPI documentation issues discovered during testing
lauraneto Jan 6, 2026
9fea065
Update OpenAPI documentation for UmbracoOpenApiOptions
lauraneto Jan 7, 2026
0f8a284
Update OpenAPI documentation for v18 URL changes
lauraneto Jan 7, 2026
6a3b49d
Update OpenAPI examples to use AddOpenApiDocumentToUi
lauraneto Jan 15, 2026
3070883
Update docs for AddDeliveryApiOpenApiMemberAuthentication extension m…
lauraneto Jan 15, 2026
4a456c5
Merge branch 'main' into cms/v18/microsoft-open-api-docs
lauraneto Apr 16, 2026
67d829e
Move OpenAPI documentation changes from v17 to v18
lauraneto Apr 16, 2026
a5e2a84
Address vale linter feedback from PR review
lauraneto Apr 29, 2026
97578c9
Merge branch 'main' into cms/v18/microsoft-open-api-docs
lauraneto May 7, 2026
75764e9
Sync v18 OpenAPI docs with current code
lauraneto May 7, 2026
34b59fc
Document new IUmbracoPipelineFilter PreMapEndpoints / PostMapEndpoint…
lauraneto May 7, 2026
a6c7a4c
Document MapToApi filtering for custom OpenAPI documents in v18
lauraneto May 7, 2026
8168e00
Trim v18 OpenAPI upgrade notes to link out to reference docs
lauraneto May 11, 2026
9322dae
Restructure API versioning and OpenAPI reference
lauraneto May 11, 2026
fb894ad
Tidy custom-backoffice-api walkthrough wording
lauraneto May 11, 2026
b8ef878
Slim adding-a-custom-openapi-document tutorial
lauraneto May 11, 2026
c4ea685
Tighten umbraco-schema-and-operation-ids tutorial wording
lauraneto May 11, 2026
bf392c7
Sharpen custom-generated-client AllowAnonymous behavior and heading c…
lauraneto May 11, 2026
d9419cd
Remove migrating-macros tutorial
lauraneto May 11, 2026
04855b3
Tighten OpenAPI wording in management-api and documenting-your-contro…
lauraneto May 11, 2026
f3f59ab
Fix schema ID example and use composer pattern for custom backoffice API
lauraneto May 11, 2026
6ce8224
Document AddBackOfficeOpenApiDocument as the recommended path for bac…
lauraneto May 11, 2026
e43c6ba
Add more details to the OpenAPI upgrade notes
lauraneto May 11, 2026
d6bdadd
Minor grammar
sofietoft May 12, 2026
701a067
Grammar fixes
sofietoft May 12, 2026
5d579d2
Fix description punctuation in OpenAPI document tutorial
sofietoft May 12, 2026
ea0dbae
Revert v18 upgrade notes changes (already added in #8049)
lauraneto May 12, 2026
a5b5f50
Merge branch 'main' into cms/v18/microsoft-open-api-docs
lauraneto May 15, 2026
6df2238
Restore links in v18 upgrade notes
lauraneto May 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions 18/umbraco-cms/.gitbook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,5 @@ redirects:
customizing/extending-overview/foundation/repositories/repository-types/tree-repository.md: customizing/extending-overview/extension-types/tree/tree-repository.md
customizing/extending-overview/extension-types/collections/collection-view.md: customizing/extending-overview/extension-types/collections/collection-view/README.md
ai/developer-mcp/host-setup: ai/local-mcp-setup/README.md
reference/custom-swagger-api: reference/custom-backoffice-api.md
tutorials/creating-a-backoffice-api/adding-a-custom-swagger-document: tutorials/creating-a-backoffice-api/adding-a-custom-openapi-document.md
6 changes: 3 additions & 3 deletions 18/umbraco-cms/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,6 @@
* [Custom Delivery API endpoints](reference/content-delivery-api/custom-delivery-api-endpoints.md)
* [Webhooks](reference/webhooks/README.md)
* [Expanding Webhook Events](reference/webhooks/expanding-webhook-events.md)
* [API versioning and OpenAPI](reference/api-versioning-and-openapi.md)
* [Searching](reference/searching/README.md)
* [Examine](reference/searching/examine/README.md)
* [Examine Management](reference/searching/examine/examine-management.md)
Expand Down Expand Up @@ -463,7 +462,8 @@
* [Management API](reference/management-api/README.md)
* [External Access](reference/management-api/external-access.md)
* [Setup OAuth using Postman](reference/management-api/postman-setup-swagger.md)
* [Custom Swagger API](reference/custom-swagger-api.md)
* [Custom Backoffice API](reference/custom-backoffice-api.md)
* [API versioning and OpenAPI](reference/api-versioning-and-openapi.md)
* [Umbraco Flavored Markdown](reference/umbraco-flavored-markdown.md)
* [Content Type Filters](reference/content-type-filters.md)
* [Database Availability Checks](reference/database-availability.md)
Expand Down Expand Up @@ -550,7 +550,7 @@
* [Create a custom maintenance page](tutorials/create-a-custom-maintenance-page.md)
* [Creating a backoffice API](tutorials/creating-a-backoffice-api/README.md)
* [Documenting your controllers](tutorials/creating-a-backoffice-api/documenting-your-controllers.md)
* [Adding a custom Swagger document](tutorials/creating-a-backoffice-api/adding-a-custom-swagger-document.md)
* [Adding a custom OpenAPI document](tutorials/creating-a-backoffice-api/adding-a-custom-openapi-document.md)
* [Versioning your API](tutorials/creating-a-backoffice-api/versioning-your-api.md)
* [Polymorphic output in the Management API](tutorials/creating-a-backoffice-api/polymorphic-output-in-the-management-api.md)
* [Umbraco schema and operation IDs](tutorials/creating-a-backoffice-api/umbraco-schema-and-operation-ids.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ This command creates a new folder called `MyExtension` with the following files

The `-ex` flag indicates that you want to include examples of how to use the extension. This flag is optional, but it is recommended to include it if you are new to building extensions for Umbraco. It will additionally give you:

- `Composers`: A folder containing an example composer that registers a custom Swagger API.
- `Composers`: A folder containing an example composer that registers a custom OpenAPI document for the API.
- `Controllers`: A folder containing an example API controller for a dashboard.
- `Client/src/api`: A folder containing an example API client that calls the API controller.
- `Client/src/dashboards`: A folder containing an example dashboard Web Component that uses the API client.
Expand Down
119 changes: 117 additions & 2 deletions 18/umbraco-cms/fundamentals/setup/upgrading/version-specific/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,122 @@ Use the [general upgrade guide](../) to complete the upgrade of your project.

<summary>Umbraco 18</summary>

*Add details about breaking changes in Umbraco 18 here.*
**Swashbuckle replaced with Microsoft.AspNetCore.OpenApi**

Umbraco no longer uses Swashbuckle for OpenAPI documentation. It has been replaced with [Microsoft.AspNetCore.OpenApi](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/openapi/overview).

If you have custom APIs with OpenAPI documentation, you will need to update your code.

*Registering OpenAPI documents*

Replace `IConfigureOptions<SwaggerGenOptions>` with `AddOpenApi()`. This can be done in `Program.cs` or in a composer. See [Adding your own OpenAPI documents](../../../../reference/api-versioning-and-openapi.md#adding-your-own-openapi-documents) for details.

Before:

```csharp
public class MyApiConfigureSwaggerGenOptions : IConfigureOptions<SwaggerGenOptions>
{
public void Configure(SwaggerGenOptions options)
{
options.SwaggerDoc("my-api-v1", new OpenApiInfo { Title = "My API v1", Version = "1.0" });
}
}

// In a composer:
builder.Services.ConfigureOptions<MyApiConfigureSwaggerGenOptions>();
```

After:

```csharp
// In Program.cs or a composer:
builder.Services.AddOpenApi("my-api-v1", options =>
{
options.AddDocumentTransformer((document, context, cancellationToken) =>
{
document.Info.Title = "My API v1";
document.Info.Version = "1.0";
return Task.CompletedTask;
});
});

// Add the document to the Swagger UI dropdown
builder.Services.AddOpenApiDocumentToUi("my-api-v1", "My API v1");
```

Note that `AddOpenApiDocumentToUi()` is required to show the document in Swagger UI. Previously with Swashbuckle, documents were automatically added to the UI when registered. The second parameter (title) is optional and defaults to the document name if not specified.
Comment thread
lauraneto marked this conversation as resolved.
Outdated

*Backoffice security requirements*

Replace `BackOfficeSecurityRequirementsOperationFilterBase` with the `AddBackofficeSecurityRequirements()` extension method. See [Custom Backoffice API](../../../../reference/custom-backoffice-api.md) for a complete example.

Before:

```csharp
public class MyApiSecurityRequirementsOperationFilter : BackOfficeSecurityRequirementsOperationFilterBase
{
protected override string ApiName => "my-api-v1";
}

options.OperationFilter<MyApiSecurityRequirementsOperationFilter>();
```

After:

```csharp
builder.Services.AddOpenApi("my-api-v1", options =>
{
options.AddBackofficeSecurityRequirements();
});
```

*Schema ID handlers*

The `ISchemaIdHandler` interface and `SchemaIdHandler` base class have been removed. Use `CreateSchemaReferenceId` on `OpenApiOptions` instead. See [Adding custom schema IDs](../../../../reference/api-versioning-and-openapi.md#adding-custom-schema-ids) for details.

*Operation ID handlers*

The `IOperationIdHandler` interface and `OperationIdHandler` base class have been removed. Use `IOpenApiOperationTransformer` instead. See [Adding custom operation IDs](../../../../reference/api-versioning-and-openapi.md#adding-custom-operation-ids) for details.

*Delivery API member authentication*

The class `ConfigureUmbracoMemberAuthenticationDeliveryApiSwaggerGenOptions` has been removed. Use the `AddDeliveryApiOpenApiMemberAuthentication()` extension method to add member authentication support to the Delivery API OpenAPI document:

```csharp
using Umbraco.Cms.Api.Delivery.OpenApi;

builder.Services.AddDeliveryApiOpenApiMemberAuthentication();
```

For more details, see [Testing with Swagger](../../../../reference/content-delivery-api/protected-content-in-the-delivery-api/README.md#testing-with-swagger).

*OpenAPI route and availability configuration*

If you were previously overriding the `OpenApiRouteTemplatePipelineFilter` methods (`OpenApiIsEnabled`, `OpenApiRouteTemplate`, or `OpenApiUiRoutePrefix`) to customize OpenAPI routes or availability, you should migrate to using `UmbracoOpenApiOptions` instead. The pipeline filter methods are now private implementation details.

Use `PostConfigure` to override the defaults:

```csharp
builder.Services.PostConfigure<UmbracoOpenApiOptions>(options =>
{
options.Enabled = true;
options.RouteTemplate = "openapi/{documentName}.json";
options.UiRoutePrefix = "openapi";
});
```

See [OpenAPI route and/or availability](../../../../reference/api-versioning-and-openapi.md#openapi-route-andor-availability) for details.

*OpenAPI URL changes*

The OpenAPI endpoints have been renamed from "swagger" to "openapi" to follow Microsoft's naming conventions:
Comment thread
lauraneto marked this conversation as resolved.
Outdated

| Old URL | New URL |
|---------|---------|
| `/umbraco/swagger` | `/umbraco/openapi` |
| `/umbraco/swagger/{documentName}/swagger.json` | `/umbraco/openapi/{documentName}.json` |

For more details, see the [API versioning and OpenAPI](../../../../reference/api-versioning-and-openapi.md) article.

</details>

Expand Down Expand Up @@ -453,7 +568,7 @@ This configuration will no longer have an effect.

Notifications have changed their behavior to an extent. You can still implement notifications such as `ContentSavingNotification` to react to changes for related systems or add messages to be shown in the Backoffice. You can no longer modify the models being transferred through the API.

If you wish to modify the Backoffice UI, register the extensions through the manifest system that hook on to the desired areas of the Backoffice UI. If you used to modify the models because you needed more data on the models, it's recommended that you build your own API controller to achieve this. You can read more about [building custom API controllers on the Umbraco Documentation](https://docs.umbraco.com/umbraco-cms/reference/custom-swagger-api) and even learn how to register your controllers in the Swagger UI.
If you wish to modify the Backoffice UI, register the extensions through the manifest system that hook on to the desired areas of the Backoffice UI. If you used to modify the models because you needed more data on the models, it's recommended that you build your own API controller to achieve this. You can read more about [building custom API controllers on the Umbraco Documentation](https://docs.umbraco.com/umbraco-cms/reference/custom-backoffice-api) and even learn how to register your controllers in Swagger UI.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[UmbracoDocs.SentenceLength] Write shorter sentences (less than 25 words). For content inside note or warning blocks, add blank lines around the content.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[UmbracoDocs.SentenceLength] Write shorter sentences (less than 25 words). For content inside note or warning blocks, add blank lines around the content.


* **Property editors have been split in two**

Expand Down
Loading
Loading