Skip to content

Wrong struct tags for application/x-www-form-urlencoded #997

@MarmaladeKnight

Description

@MarmaladeKnight

My response scheme

      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                action:
                  type: array
                  $ref: '#/components/schemas/Action'
                services:
                  type: array
                  items:
                    type: string

Expected output

type ReleaseServicesFormdataBody struct {
	Action   *Action   `form:"action,omitempty"`
	Services *[]string `form:"services,omitempty"`
}

What i really get

type ReleaseServicesFormdataBody struct {
	Action   *Action   `json:"action,omitempty"`
	Services *[]string `json:"services,omitempty"`
}

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