Skip to content

Amend reserved names when used as parameters #429

@Zukunftsmusik

Description

@Zukunftsmusik

In my OAD, I'm using a query parameter called from. Code generation failed while formatting with black, since from is a reserved word in python and the operation's function signature couldn't be parsed.

A solution would be to automatically append an underscore (_) to the parameter name in the function signature, if it's a reserved word. Then use the alias keyword in the parameter definition's constructor (Path, Query etc.).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions