Description
The docs say that adding x-swagger-router-controller should make the operationId field relative - however, the operationId field in the swagger subdirectory of the generated python flask scaffold always contains the full default controller prefix.
Swagger-codegen version
Current stable (2.2.1)
Swagger declaration file content or url
swagger: '2.0'
info:
version: 0.0.0
title: Simple API
paths:
/test:
get:
summary: "demonstrate x-swagger-router-controller bug in python flask"
x-swagger-router-controller: bla
operationId: test_get
responses:
200:
description: OK
Command line used for generation
java -jar swagger-codegen-cli.jar generate -l python-flask -i .\Swagger.yaml
Steps to reproduce
- Generate the python flask scaffold with the above command or the swagger online editor
- check swagger/swagger.yaml in the generated scaffold. operationId should be just
operationId: "test_get" but is operationId: "controllers.default_controller.test_get"
Related issues
Couldn't find one
Suggest a Fix
The code preprocessing the operationId field should take the field x-swagger-router-controller into account: https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/FlaskConnexionCodegen.java#L234
Description
The docs say that adding x-swagger-router-controller should make the operationId field relative - however, the operationId field in the swagger subdirectory of the generated python flask scaffold always contains the full default controller prefix.
Swagger-codegen version
Current stable (2.2.1)
Swagger declaration file content or url
Command line used for generation
java -jar swagger-codegen-cli.jar generate -l python-flask -i .\Swagger.yamlSteps to reproduce
operationId: "test_get"but isoperationId: "controllers.default_controller.test_get"Related issues
Couldn't find one
Suggest a Fix
The code preprocessing the operationId field should take the field x-swagger-router-controller into account: https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/FlaskConnexionCodegen.java#L234