I have generated a flask server with Swagger/OpenAPI, using an YAML definition file. An extract of a GET endpoint:
parameters:
- in: query
name: project-name
required: true
schema:
type: string
description: name of the project
- in: query
name: file-name
required: true
schema:
type: string
description: name of the origin file of the dataset
- in: query
name: null-management
required: true
schema:
type: string
description: value to use to fill null values in datasets
- in: query
name: category-name
schema:
type: string
description: name of the first level category
- in: query
name: filter-multi-occurrence
schema:
type: boolean
description: if multi occurrences are to be filtered or not
the problem is that I cannot map it with Python/Flask controller, because the variables should be like this
def dataset_add(project_name: str, file_name: str, null_management: str, first_level_category_name: str = None,
filter_multi_occurrence: str = None) -> str: # noqa: E501
... and dashes are not allowed in Python's variable names. But I don't wanna use underscores in GET query... how can I solve this problem in Flask?
