fastapi-code-generator icon indicating copy to clipboard operation
fastapi-code-generator copied to clipboard

Special input parameter support

Open Chise1 opened this issue 3 years ago • 0 comments

An error is reported when a function variable is a Python keyword. Like this:

 "parameters": [
          {
            "name": "from",
            "in": "query",
            "description": "起点坐标,39.071510,117.190091",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
         ...

Maybe you should generate something like this:

    from_: str=Field(alias="from"),

Chise1 avatar Sep 11 '22 04:09 Chise1