Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,16 @@ public void processOpts() {

supportingFiles.add(new SupportingFile("model_utils.mustache", packagePath(), "model_utils.py"));


// add the models and apis folders
supportingFiles.add(new SupportingFile("__init__models.mustache", packagePath() + File.separatorChar + "models", "__init__.py"));
SupportingFile originalInitModel = supportingFiles.stream()
.filter(sf -> sf.getTemplateFile().equals("__init__model.mustache"))
.reduce((a, b) -> {
throw new IllegalStateException("Multiple elements: " + a + ", " + b);
})
.get();
supportingFiles.remove(originalInitModel);
supportingFiles.add(new SupportingFile("__init__model.mustache", packagePath() + File.separatorChar + "model", "__init__.py"));
supportingFiles.add(new SupportingFile("__init__apis.mustache", packagePath() + File.separatorChar + "apis", "__init__.py"));
// Generate the 'signing.py' module, but only if the 'HTTP signature' security scheme is specified in the OAS.
Expand Down
1 change: 0 additions & 1 deletion samples/client/petstore/python/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ petstore_api/model/user.py
petstore_api/model/xml_item.py
petstore_api/model_utils.py
petstore_api/models/__init__.py
petstore_api/models/__init__.py
petstore_api/rest.py
requirements.txt
setup.cfg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ x_auth_id_alias/exceptions.py
x_auth_id_alias/model/__init__.py
x_auth_id_alias/model_utils.py
x_auth_id_alias/models/__init__.py
x_auth_id_alias/models/__init__.py
x_auth_id_alias/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ dynamic_servers/exceptions.py
dynamic_servers/model/__init__.py
dynamic_servers/model_utils.py
dynamic_servers/models/__init__.py
dynamic_servers/models/__init__.py
dynamic_servers/rest.py
git_push.sh
requirements.txt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ petstore_api/model/whale.py
petstore_api/model/zebra.py
petstore_api/model_utils.py
petstore_api/models/__init__.py
petstore_api/models/__init__.py
petstore_api/rest.py
petstore_api/signing.py
requirements.txt
Expand Down