Skip to content

Commit 8ad6fff

Browse files
authored
python-fastapi: avoid log message in constructor (#22522)
* python-fastapi: avoid log message in constructor * update doc
1 parent 7cc0a7a commit 8ad6fff

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

docs/generators.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ id: generators
33
title: Generators List
44
---
55

6-
[main] INFO o.o.c.l.PythonFastAPIServerCodegen - Skipping sorting of path operations, order matters, let the developer decide via their specification file.
76
The following generators are available:
87

98
## CLIENT generators

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonFastAPIServerCodegen.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,6 @@ public String getHelp() {
9090
public PythonFastAPIServerCodegen() {
9191
super();
9292

93-
// Skip sorting of operations to preserve the order found in the OpenAPI spec file. See
94-
// https://fastapi.tiangolo.com/tutorial/path-params/?h=path#order-matters for details on why order matters.
95-
LOGGER.info("Skipping sorting of path operations, order matters, let the developer decide via their specification file.");
9693
setSkipSortingOperations(true);
9794

9895
modifyFeatureSet(features -> features.includeSecurityFeatures(
@@ -150,6 +147,11 @@ public PythonFastAPIServerCodegen() {
150147
public void processOpts() {
151148
super.processOpts();
152149

150+
// Skip sorting of operations via setSkipSortingOperations(true) in the constructor to preserve the order
151+
// found in the OpenAPI spec file. See
152+
// https://fastapi.tiangolo.com/tutorial/path-params/?h=path#order-matters for details on why order matters.
153+
LOGGER.info("Skipping sorting of path operations, order matters, let the developer decide via their specification file.");
154+
153155
if (additionalProperties.containsKey(CodegenConstants.PACKAGE_NAME)) {
154156
setPackageName((String) additionalProperties.get(CodegenConstants.PACKAGE_NAME));
155157
}

0 commit comments

Comments
 (0)