Describe the bug
The OpenApiSchema copy constructor, i.e. OpenApiSchema.OpenApiSchema(OpenApischema schema) does not copy the OpenApiSchema.Extensions property.
To Reproduce
The following snippet will reproduce the problem:
using Microsoft.OpenApi.Any;
using Microsoft.OpenApi.Models;
var schema = new OpenApiSchema
{
Extensions =
{
{ "x-myextension", new OpenApiInteger(42) }
}
};
var schemaCopy = new OpenApiSchema(schema);
if (schemaCopy.Extensions.Count != 1)
Console.WriteLine("Extensions were not copied");
Expected behavior
The Extensions property should be copied by the copy constructor.