-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Closed as not planned
Closed as not planned
Copy link
Labels
Source - Docs.msDocs Customer feedback via GitHub IssueDocs Customer feedback via GitHub Issueaspnet-core/svcfundamentals/subsvc
Description
Description
The customization documentation is broken in .NET 10 previews as apparently the types returned have changed.
E.g. this example from the docs:
builder.Services.AddOpenApi(options => {
// Schema transformer to set the format of decimal to 'decimal'
options.AddSchemaTransformer((schema, context, cancellationToken) =>
{
if (context.JsonTypeInfo.Type == typeof(decimal))
{
schema.Format = "decimal";
}
return Task.CompletedTask;
});
});Causes compile error:
CS0200: Property or indexer 'IOpenApiSchema.Format' cannot be assigned to -- it is read only
This is making my applications incompatible with .NET 10. What is the recommended way to make format transformations now?
Page URL
Content source URL
Document ID
ea5fce3c-e38f-9531-b77a-3e9a5e8e30ce
Platform Id
126b754a-260a-3efc-a261-b0d72ad0d8ce
Article author
Metadata
- ID: ea5fce3c-e38f-9531-b77a-3e9a5e8e30ce
- PlatformId: 126b754a-260a-3efc-a261-b0d72ad0d8ce
- Service: aspnet-core
- Sub-service: fundamentals
Metadata
Metadata
Assignees
Labels
Source - Docs.msDocs Customer feedback via GitHub IssueDocs Customer feedback via GitHub Issueaspnet-core/svcfundamentals/subsvc