Swashbuckle.AspNetCore.Filters icon indicating copy to clipboard operation
Swashbuckle.AspNetCore.Filters copied to clipboard

AddResponseHeadersFilter adds description twice

Open runehalfdan opened this issue 3 years ago • 0 comments

When generating the response header info, description is added both to the OpenApiHeader and OpenApiSchema.

Also, since Format defaults to empty string, an empty Format-entry is added to the Schema (Currently we work around this by setting Format to null explicitly)

For large documents with many operations, this adds significant bloat to schema Example:

"headers": {
  "link": {
    "description": "Description of response header",
    "schema": {
      "type": "string",
      "description": "Description of response header",
      "format":  ""
    }
  }
},

runehalfdan avatar Jul 02 '21 11:07 runehalfdan