Skip to content

Support application/json-patch+json MIME type #1487

@bcordobaq

Description

@bcordobaq

Hi, I noticed that the application/json-patch+json MIME type is not supported, which is needed for PATCH operations. This type is defined in RFC 6902.
The problem is that the accepted MIME types are a fixed list, so if the type is not mapped there, it breaks during swag generation:

ParseComment error in file XXX.go :json-patch+json accept type can't be accepted

To solve this, a possible solution might be adding the type mapping as json-patch into the MIME list.

Other alternatives might be supporting a full Content-Type declaration, with no mapping, considering the user value as the final accept/produce values.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions