Description
Model are created the lack the required imports to run correctly. This fails for petstore example!
openapi-generator version
Failed for 3.3.4 and lastest from master branch
OpenAPI declaration file content or url
https://raw.githubusercontent.com/OpenAPITools/openapi-petstore/master/src/main/resources/openapi.yaml
Command line used for generation
Options for gradle used for 4.4.3 test:
inputSpec = "${rootDir}/openapi.yaml".toString()
outputDir = swaggerOutputDir
templateDir= "${rootDir}/templates/flaskConnexion".toString()
apiPackage = "swagger_server"
invokerPackage = "swagger_server"
modelPackage = "models"
additionalProperties = [
packageName: "swagger_server",
controllerPackage: "controllers"
]
Pretty sure that only generatorName = "python-flask" is relevant.
For head of master, used a local docker build:
docker build .
Get image ID from above command
docker run --rm -v ${PWD}:/local <ID> generate -i https://raw.githubusercontent.com/OpenAPITools/openapi-petstore/master/src/main/resources/openapi.yaml -g python-flask -o /local/out/py
Steps to reproduce
-
Generate code for python-flask using petstore yaml (https://raw.githubusercontent.com/OpenAPITools/openapi-petstore/master/src/main/resources/openapi.yaml)
-
Look at generated model for models/pet.py
There are no imports for Category or Tag
Related issues/PRs
Description
Model are created the lack the required imports to run correctly. This fails for petstore example!
openapi-generator version
Failed for 3.3.4 and lastest from master branch
OpenAPI declaration file content or url
https://raw.githubusercontent.com/OpenAPITools/openapi-petstore/master/src/main/resources/openapi.yaml
Command line used for generation
Options for gradle used for 4.4.3 test:
Pretty sure that only generatorName = "python-flask" is relevant.
For head of master, used a local docker build:
Steps to reproduce
Generate code for python-flask using petstore yaml (https://raw.githubusercontent.com/OpenAPITools/openapi-petstore/master/src/main/resources/openapi.yaml)
Look at generated model for models/pet.py
There are no imports for Category or Tag
Related issues/PRs
rewhen usingstringwithpattern#1668