Skip to content

x-www-form-urlencoded in requestBody: no parameters generated #656

Closed
@supermihi

Description

@supermihi

I am trying to generate a client for the following spec:

openapi: 3.0.3
info:
  title: Test
  version: 1.2.3
paths:
  /bar:
    post:
      summary: Do something
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required: [ form_param ]
              properties:
                form_param:
                  type: string
      responses:
        200:
          description: ""

The output however doesn't contain any parameters:

def sync_detailed(
    *,
    client: Client,
) -> Response[Any]:
    """Do something

    Returns:
        Response[Any]
    """
    ...

I am using the latest version:

❯ openapi-python-client --version
openapi-python-client version: 0.11.5

Any hints? Is this a missing feature? From the closed issues, I got the impression that form data should be supported, in general?

The parameter is rendered correctly in Swagger UI / editor, so I am pretty sure that the spec is correct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions