Swashbuckle.AspNetCore
Swashbuckle.AspNetCore copied to clipboard
Bug: readOnly is set to true on Schema but this is not reflected in Swagger file
Version: 6.1.4
I have some model properties annotated with [SwaggerSchema(ReadOnly = true)]
. When I debug and inspect the OpenAPISchema
property corresponding to one of these model properties, its readOnly
property is set to true
, as expected. Yet these properties are not marked as readOnly in the produced Swagger file (the readOnly
key doesn't appear at all for them).
I am using NewtonSoft as my serializer and have followed the instructions for handling this in the README.