Browse Source

Merge pull request #24962 from abpframework/copilot/update-migration-guide-v10-1

docs: Add Swashbuckle.AspNetCore v10 upgrade section to v10.1 migration guide
pull/24964/head
Engincan VESKE 1 month ago
committed by GitHub
parent
commit
ae9891a7e5
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 28
      docs/en/release-info/migration-guides/abp-10-1.md

28
docs/en/release-info/migration-guides/abp-10-1.md

@ -11,6 +11,34 @@ This document is a guide for upgrading ABP v10.0 solutions to ABP v10.1. There a
## Open-Source (Framework)
### Swashbuckle.AspNetCore Upgraded to v10
In this version, the `Swashbuckle.AspNetCore` package has been upgraded to v10. This upgrade also updates the underlying `Microsoft.OpenApi` package to v2.x, which introduces breaking changes that may affect your application if you have any custom Swagger/OpenAPI configuration such as custom filters, schema customizations, or security requirements.
**Required Actions:**
- Update any `using` directives that reference types from the `Microsoft.OpenApi.Models` namespace to also include the new `Microsoft.OpenApi` namespace (interfaces such as `IOpenApiSchema` are now in `Microsoft.OpenApi`, while concrete types such as `OpenApiSchema` remain in `Microsoft.OpenApi.Models`).
- Update filter/handler method signatures to accept the new interfaces (e.g. `IOpenApiSchema` instead of `OpenApiSchema`). When you need to mutate properties, cast to the concrete type first. For example:
```csharp
public void Apply(IOpenApiSchema schema, SchemaFilterContext context)
{
if (schema is OpenApiSchema openApiSchema)
{
// Properties are only mutable on the concrete type
openApiSchema.Type = JsonSchemaType.String;
}
}
```
- Replace usage of the `OpenApiSchema.Type` property using a string (e.g. `"string"` or `"boolean"`) with the `JsonSchemaType` flags enumeration.
- Replace usage of the `OpenApiSchema.Nullable` property by OR-ing the `JsonSchemaType.Null` value to `OpenApiSchema.Type` (e.g. `schema.Type |= JsonSchemaType.Null;`).
- Update any use of `.Reference` properties (e.g. `OpenApiSchema.ReferenceV3`) to use the new `*Reference` class instead (e.g. `OpenApiSchemaReference`).
- Update any use of `AddSecurityRequirement()` to use a `Func<OpenApiDocument, OpenApiSecurityRequirement>`.
For a full list of migration steps, please refer to the [Swashbuckle.AspNetCore v10 migration guide](https://github.com/domaindrivendev/Swashbuckle.AspNetCore/blob/master/docs/migrating-to-v10.md#migration-overview).
> See [#24255](https://github.com/abpframework/abp/pull/24255) for more details.
### Add New EF Core Migrations for Password History/User Passkey Entities
In this version, we added password history/ user passkeys support to the [Identity PRO Module](../../modules/identity-pro.md) to enhance security compliance. A new `IdentityUserPasswordHistory` entity has been added to store previous password hashes, preventing users from reusing recent passwords. Additionally, we have introduced an `IdentityUserPasskey `entity to support passkey-based authentication.

Loading…
Cancel
Save