Skip to content

Can we add support for object type in HTTP header? #836

@YaoYao-dd

Description

@YaoYao-dd

I understand its kind of silly, but sometimes it is very useful to pass complex object for GET operation, e.g. JSON Web Token(JWTs).

We can borrow the Consumer definition of Operation, in swagger spec file, if we let header parameter to refer to object type, SwaggerUI can easily show what kind of request is acceptable. Codegen can generate code accordingly. Currently header param only supports String, but we can add type definition. When come to HTTP Content-Type(MIME), we don't really care about it much. Swagger is used to demonstrate interface between client and service provider, SwaggerUI and Editor/Codegen can fill that gap. Actually body and header have no difference at all from user's perspective, just place to hold data. Many thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions