fabien0102 / openapi-codegen

A tool for generating code base on an OpenAPI schema.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenAPI requestBody application/x-www-form-urlencoded

lfanselau opened this issue · comments

Hi, great library so far! I have a problem when implementing an authentication flow with FastAPI (as by their tutorial https://fastapi.tiangolo.com/tutorial/security/simple-oauth2/#use-the-form-data). The tutorial uses FormData for passing in the username and password. Investigating, this gets parsed into the openapi.json like this:

{
  "requestBody": {
    "content": {
      "application/x-www-form-urlencoded": { ... }
    }
  }
}

The problem seems to be, that this media type is not supported here:

Any plans to update this behavior, since manually changing the types is really cumbersome when they get overwritten...