Compare commits

..

1 Commits

Author SHA1 Message Date
William Cheng
0e8a6ac11d test with JDK21 in github workflow 2025-10-16 19:34:46 +08:00
1411 changed files with 6250 additions and 9593 deletions

View File

@@ -19,7 +19,6 @@ jobs:
with:
java-version: 11
distribution: 'temurin'
cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:

View File

@@ -37,7 +37,6 @@ jobs:
with:
distribution: 'temurin'
java-version: 11
cache: gradle
# Cache Gradle Dependencies
- name: Setup Gradle Dependencies Cache
uses: actions/cache@v4

View File

@@ -16,7 +16,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: [11, 17]
java: [11, 17, 21]
os: [ubuntu-latest]
steps:
- name: Check out code
@@ -27,7 +27,6 @@ jobs:
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: gradle
- uses: actions/cache@v4
with:
@@ -62,7 +61,7 @@ jobs:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
- name: Upload Maven build artifact
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v4
if: matrix.java == '11' && matrix.os == 'ubuntu-latest'
with:
name: artifact
@@ -96,9 +95,8 @@ jobs:
with:
java-version: 11
maven-version: 3.8.8
cache: gradle
- name: Download build artifact
uses: actions/download-artifact@v6
uses: actions/download-artifact@v5
with:
name: artifact
- name: Run Ensures Script

View File

@@ -21,7 +21,6 @@ jobs:
with:
java-version: 11
distribution: 'temurin'
cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:
@@ -42,7 +41,7 @@ jobs:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
- run: ls -la modules/openapi-generator-cli/target
- name: Upload openapi-generator-cli.jar artifact
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v4
with:
name: openapi-generator-cli.jar
path: modules/openapi-generator-cli/target/openapi-generator-cli.jar
@@ -60,7 +59,6 @@ jobs:
with:
java-version: 11
distribution: 'temurin'
cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:
@@ -81,7 +79,7 @@ jobs:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
- name: Publish unit test reports
if: ${{ always() }}
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v4
with:
name: surefire-test-results
path: '**/surefire-reports/TEST-*.xml'
@@ -99,7 +97,7 @@ jobs:
java-version: 11
distribution: 'temurin'
- name: Download openapi-generator-cli.jar artifact
uses: actions/download-artifact@v6
uses: actions/download-artifact@v5
with:
name: openapi-generator-cli.jar
path: modules/openapi-generator-cli/target
@@ -138,7 +136,7 @@ jobs:
java-version: 11
distribution: 'temurin'
- name: Download openapi-generator-cli.jar artifact
uses: actions/download-artifact@v6
uses: actions/download-artifact@v5
with:
name: openapi-generator-cli.jar
path: modules/openapi-generator-cli/target

View File

@@ -26,7 +26,6 @@ jobs:
with:
distribution: 'temurin'
java-version: 8
cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:

View File

@@ -118,7 +118,6 @@ jobs:
with:
distribution: 'temurin'
java-version: 11
cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:

View File

@@ -42,7 +42,6 @@ jobs:
with:
distribution: 'temurin'
java-version: 17
cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:

View File

@@ -77,7 +77,6 @@ jobs:
with:
distribution: 'temurin'
java-version: 11
cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:

View File

@@ -26,7 +26,6 @@ jobs:
with:
distribution: 'temurin'
java-version: 17
cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:

View File

@@ -52,7 +52,6 @@ jobs:
with:
distribution: 'temurin'
java-version: 17
cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:

View File

@@ -32,7 +32,6 @@ jobs:
with:
distribution: 'temurin'
java-version: 21
cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:

View File

@@ -59,8 +59,7 @@ jobs:
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 11
cache: gradle
java-version: 8
- name: Cache maven dependencies
uses: actions/cache@v4
env:

View File

@@ -16,7 +16,7 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
java: [11, 17]
java: [11, 17, 21]
steps:
- uses: actions/checkout@v5
- name: Set up JDK ${{ matrix.java }}
@@ -24,7 +24,6 @@ jobs:
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: gradle
- name: Cache maven dependencies
uses: actions/cache@v4
env:

View File

@@ -59,6 +59,6 @@
sha256: 45cdaba3d2adc212cd4f0184ad475419a95e2326254c2ef84175e210c922b2f3
# rust axum test files
- filename: "samples/server/petstore/rust-axum/output/rust-axum-oneof/tests/oneof_with_discriminator.rs"
sha256: b2093528aac971193f2863a70f46eea45cf8bda79120b133a614599e80d8b46d
sha256: 2d4f5a069fdcb3057bb078d5e75b3de63cd477b97725e457079df24bd2c30600
- filename: "samples/server/petstore/rust-axum/output/openapi-v3/tests/oneof_untagged.rs"
sha256: 1d3fb01f65e98290b1d3eece28014c7d3e3f2fdf18e7110249d3c591cc4642ab

View File

@@ -538,7 +538,6 @@ OpenAPI Normalizer transforms the input OpenAPI doc/spec (which may not perfectl
- SIMPLIFY_ONEOF_ANYOF
- SIMPLIFY_BOOLEAN_ENUM
- REFACTOR_ALLOF_WITH_PROPERTIES_ONLY
(One can use `DISABLE_ALL=true` to disable all the rules)
@@ -646,7 +645,7 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat
- `FILTER`
The `FILTER` parameter allows selective inclusion of API operations based on specific criteria. It applies the `x-internal: true` property to operations that do **not** match the specified values, preventing them from being generated. Multiple filters can be separated by a semicolon.
The `FILTER` parameter allows selective inclusion of API operations based on specific criteria. It applies the `x-internal: true` property to operations that do **not** match the specified values, preventing them from being generated.
### Available Filters
@@ -659,9 +658,6 @@ The `FILTER` parameter allows selective inclusion of API operations based on spe
- **`tag`**
When set to `tag:person|basic`, operations **not** tagged with `person` or `basic` will be marked as internal (`x-internal: true`), and will not be generated.
- **`path`**
When set to `path:/v1|/v2`, operations on paths **not** starting with `/v1` or with `/v2` will be marked as internal (`x-internal: true`), and will not be generated.
### Example Usage
```sh
@@ -669,7 +665,7 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat
-g java \
-i modules/openapi-generator/src/test/resources/3_0/petstore.yaml \
-o /tmp/java-okhttp/ \
--openapi-normalizer FILTER="operationId:addPet|getPetById ; tag:store"
--openapi-normalizer FILTER="operationId:addPet|getPetById"
```
- `SET_CONTAINER_TO_NULLABLE`: When set to `array|set|map` (or just `array`) for example, it will set `nullable` in array, set and map to true.

View File

@@ -3,7 +3,6 @@ id: generators
title: Generators List
---
[main] INFO o.o.c.l.PythonFastAPIServerCodegen - Skipping sorting of path operations, order matters, let the developer decide via their specification file.
The following generators are available:
## CLIENT generators

View File

@@ -133,9 +133,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|x-spring-paginated|Add `org.springframework.data.domain.Pageable` to controller method. Can be used to handle `page`, `size` and `sort` query parameters. If these query parameters are also specified in the operation spec, they will be removed from the controller method as their values can be obtained from the `Pageable` object.|OPERATION|false
|x-version-param|Marker property that tells that this parameter would be used for endpoint versioning. Applicable for headers & query params. true/false|OPERATION_PARAMETER|null
|x-pattern-message|Add this property whenever you need to customize the invalidation error message for the regex pattern of a variable|FIELD, OPERATION_PARAMETER|null
|x-size-message|Add this property whenever you need to customize the invalidation error message for the size or length of a variable|FIELD, OPERATION_PARAMETER|null
|x-minimum-message|Add this property whenever you need to customize the invalidation error message for the minimum value of a variable|FIELD, OPERATION_PARAMETER|null
|x-maximum-message|Add this property whenever you need to customize the invalidation error message for the maximum value of a variable|FIELD, OPERATION_PARAMETER|null
|x-spring-api-version|Value for 'version' attribute in @RequestMapping (for Spring 7 and above).|OPERATION|null

View File

@@ -67,9 +67,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL|
|x-field-extra-annotation|List of custom annotations to be added to property|FIELD, OPERATION_PARAMETER|null
|x-pattern-message|Add this property whenever you need to customize the invalidation error message for the regex pattern of a variable|FIELD, OPERATION_PARAMETER|null
|x-size-message|Add this property whenever you need to customize the invalidation error message for the size or length of a variable|FIELD, OPERATION_PARAMETER|null
|x-minimum-message|Add this property whenever you need to customize the invalidation error message for the minimum value of a variable|FIELD, OPERATION_PARAMETER|null
|x-maximum-message|Add this property whenever you need to customize the invalidation error message for the maximum value of a variable|FIELD, OPERATION_PARAMETER|null
|x-kotlin-implements|Ability to specify interfaces that model must implement|MODEL|empty array
|x-kotlin-implements-fields|Specify attributes that are implemented by the interface(s) added via `x-kotlin-implements`|MODEL|empty array

View File

@@ -126,9 +126,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|x-spring-paginated|Add `org.springframework.data.domain.Pageable` to controller method. Can be used to handle `page`, `size` and `sort` query parameters. If these query parameters are also specified in the operation spec, they will be removed from the controller method as their values can be obtained from the `Pageable` object.|OPERATION|false
|x-version-param|Marker property that tells that this parameter would be used for endpoint versioning. Applicable for headers & query params. true/false|OPERATION_PARAMETER|null
|x-pattern-message|Add this property whenever you need to customize the invalidation error message for the regex pattern of a variable|FIELD, OPERATION_PARAMETER|null
|x-size-message|Add this property whenever you need to customize the invalidation error message for the size or length of a variable|FIELD, OPERATION_PARAMETER|null
|x-minimum-message|Add this property whenever you need to customize the invalidation error message for the minimum value of a variable|FIELD, OPERATION_PARAMETER|null
|x-maximum-message|Add this property whenever you need to customize the invalidation error message for the maximum value of a variable|FIELD, OPERATION_PARAMETER|null
|x-spring-api-version|Value for 'version' attribute in @RequestMapping (for Spring 7 and above).|OPERATION|null

View File

@@ -44,7 +44,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|supportsES6|Generate code that conforms to ES6.| |false|
|useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.| |false|
|useSquareBracketsInArrayNames|Setting this property to true will add brackets to array attribute names, e.g. my_values[].| |false|
|withAWSV4Signature|whether to include AWS v4 signature support| |false|
|withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false|
|withNodeImports|Setting this property to true adds imports for NodeJS| |false|
|withSeparateModelsAndApi|Put the model and api in separate folders and in separate classes. This requires in addition a value for 'apiPackage' and 'modelPackage'| |false|
@@ -292,7 +291,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|OAuth2_ClientCredentials|✗|OAS2,OAS3
|OAuth2_AuthorizationCode|✗|OAS2,OAS3
|SignatureAuth|✗|OAS3
|AWSV4Signature||ToolingExtension
|AWSV4Signature||ToolingExtension
### Wire Format Feature
| Name | Supported | Defined By |

View File

@@ -29,7 +29,6 @@ import io.airlift.airline.Arguments;
import io.airlift.airline.Command;
import io.airlift.airline.Option;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.Strings;
import org.apache.commons.lang3.StringUtils;
import org.openapitools.codegen.ClientOptInput;
import org.openapitools.codegen.CodegenConfig;
@@ -249,7 +248,7 @@ public class GenerateBatch extends OpenApiGeneratorCommand {
Path filesMeta = Paths.get(outDir.toAbsolutePath().toString(), ".openapi-generator", "FILES");
if (filesMeta.toFile().exists()) {
FileUtils.readLines(filesMeta.toFile(), StandardCharsets.UTF_8).forEach(relativePath -> {
if (!Strings.CS.startsWith(relativePath, ".")) {
if (!StringUtils.startsWith(relativePath, ".")) {
Path file = outDir.resolve(relativePath).toAbsolutePath();
// hack: disallow directory traversal outside of output directory. we don't want to delete wrong files.
if (file.toString().startsWith(outDir.toAbsolutePath().toString())) {

View File

@@ -5734,7 +5734,7 @@ public class DefaultCodegen implements CodegenConfig {
cs.name = key;
cs.description = securityScheme.getDescription();
cs.type = securityScheme.getType().toString();
cs.isCode = cs.isPassword = cs.isApplication = cs.isImplicit = cs.isOpenId = cs.isOAuth = false;
cs.isCode = cs.isPassword = cs.isApplication = cs.isImplicit = cs.isOpenId = false;
cs.isHttpSignature = false;
cs.isBasicBasic = cs.isBasicBearer = false;
cs.scheme = securityScheme.getScheme();

View File

@@ -49,7 +49,7 @@ public class OpenAPINormalizer {
private TreeSet<String> anyTypeTreeSet = new TreeSet<>();
protected static final Logger LOGGER = LoggerFactory.getLogger(OpenAPINormalizer.class);
protected final Logger LOGGER = LoggerFactory.getLogger(OpenAPINormalizer.class);
Set<String> ruleNames = new TreeSet<>();
Set<String> rulesDefaultToTrue = new TreeSet<>();
@@ -133,6 +133,10 @@ public class OpenAPINormalizer {
// when set (e.g. operationId:getPetById|addPet), filter out (or remove) everything else
final String FILTER = "FILTER";
HashSet<String> operationIdFilters = new HashSet<>();
HashSet<String> methodFilters = new HashSet<>();
HashSet<String> tagFilters = new HashSet<>();
// when set (e.g. operationId:getPetById|addPet), filter out (or remove) everything else
final String SET_CONTAINER_TO_NULLABLE = "SET_CONTAINER_TO_NULLABLE";
@@ -211,7 +215,6 @@ public class OpenAPINormalizer {
rules.put(SIMPLIFY_ONEOF_ANYOF, true);
rules.put(SIMPLIFY_BOOLEAN_ENUM, true);
rules.put(SIMPLIFY_ONEOF_ANYOF_ENUM, true);
rules.put(REFACTOR_ALLOF_WITH_PROPERTIES_ONLY, true);
processRules(inputRules);
@@ -272,7 +275,30 @@ public class OpenAPINormalizer {
if (inputRules.get(FILTER) != null) {
rules.put(FILTER, true);
// actual parsing is delayed to allow customization of the Filter processing
String[] filterStrs = inputRules.get(FILTER).split(":");
if (filterStrs.length != 2) { // only support operationId with : at the moment
LOGGER.error("FILTER rule must be in the form of `operationId:name1|name2|name3` or `method:get|post|put` or `tag:tag1|tag2|tag3`: {}", inputRules.get(FILTER));
} else {
if ("operationId".equals(filterStrs[0])) {
operationIdFilters = Arrays.stream(filterStrs[1].split("[|]"))
.filter(Objects::nonNull)
.map(String::trim)
.collect(Collectors.toCollection(HashSet::new));
} else if ("method".equals(filterStrs[0])) {
methodFilters = Arrays.stream(filterStrs[1].split("[|]"))
.filter(Objects::nonNull)
.map(String::trim)
.collect(Collectors.toCollection(HashSet::new));
} else if ("tag".equals(filterStrs[0])) {
tagFilters = Arrays.stream(filterStrs[1].split("[|]"))
.filter(Objects::nonNull)
.map(String::trim)
.collect(Collectors.toCollection(HashSet::new));
} else {
LOGGER.error("FILTER rule must be in the form of `operationId:name1|name2|name3` or `method:get|post|put` or `tag:tag1|tag2|tag3`: {}", inputRules.get(FILTER));
}
}
}
if (inputRules.get(SET_CONTAINER_TO_NULLABLE) != null) {
@@ -318,19 +344,6 @@ public class OpenAPINormalizer {
}
}
/**
* Create the filter to process the FILTER normalizer.
* Override this to create a custom filter normalizer.
*
* @param openApi Contract used in the filtering (could be used for customization).
* @param filters full FILTER value
*
* @return a Filter containing the parsed filters.
*/
protected Filter createFilter(OpenAPI openApi, String filters) {
return new Filter(filters);
}
/**
* Normalizes the OpenAPI input, which may not perfectly conform to
* the specification.
@@ -392,15 +405,15 @@ public class OpenAPINormalizer {
"trace", PathItem::getTrace
);
if (Boolean.TRUE.equals(getRule(FILTER))) {
String filters = inputRules.get(FILTER);
Filter filter = createFilter(this.openAPI, filters);
if (filter.parse()) {
// Iterates over each HTTP method in methodMap, retrieves the corresponding Operations from the PathItem,
// and marks it as internal (`x-internal=true`) if the method/operationId/tag/path is not in the filters.
filter.apply(pathsEntry.getKey(), path, methodMap);
// Iterates over each HTTP method in methodMap, retrieves the corresponding Operation from the PathItem,
// and marks it as internal (`x-internal`) if the method is not in methodFilters.
methodMap.forEach((method, getter) -> {
Operation operation = getter.apply(path);
if (operation != null && !methodFilters.isEmpty()) {
LOGGER.info("operation `{}` marked internal only (x-internal: `{}`) by the method FILTER", operation.getOperationId(), !methodFilters.contains(method));
operation.addExtension("x-internal", !methodFilters.contains(method));
}
}
});
// Include callback operation as well
for (Operation operation : path.readOperations()) {
@@ -417,6 +430,22 @@ public class OpenAPINormalizer {
normalizeParameters(path.getParameters());
for (Operation operation : operations) {
if (operationIdFilters.size() > 0) {
if (operationIdFilters.contains(operation.getOperationId())) {
operation.addExtension(X_INTERNAL, false);
} else {
LOGGER.info("operation `{}` marked as internal only (x-internal: true) by the operationId FILTER", operation.getOperationId());
operation.addExtension(X_INTERNAL, true);
}
} else if (!tagFilters.isEmpty()) {
if (operation.getTags().stream().anyMatch(tagFilters::contains)) {
operation.addExtension(X_INTERNAL, false);
} else {
LOGGER.info("operation `{}` marked as internal only (x-internal: true) by the tag FILTER", operation.getOperationId());
operation.addExtension(X_INTERNAL, true);
}
}
normalizeOperation(operation);
normalizeRequestBody(operation);
normalizeParameters(operation.getParameters());
@@ -1334,7 +1363,7 @@ public class OpenAPINormalizer {
*
* @param schema Schema to modify
* @param subSchemas List of sub-schemas to check
* @param composedType Type of composed schema ("oneOf" or "anyOf")
* @param schemaType Type of composed schema ("oneOf" or "anyOf")
* @return Simplified schema
*/
protected Schema simplifyComposedSchemaWithEnums(Schema schema, List<Object> subSchemas, String composedType) {
@@ -1803,164 +1832,4 @@ public class OpenAPINormalizer {
}
// ===================== end of rules =====================
protected static class Filter {
public static final String OPERATION_ID = "operationId";
public static final String METHOD = "method";
public static final String TAG = "tag";
public static final String PATH = "path";
private final String filters;
protected Set<String> operationIdFilters = Collections.emptySet();
protected Set<String> methodFilters = Collections.emptySet();
protected Set<String> tagFilters = Collections.emptySet();
protected Set<String> pathStartingWithFilters = Collections.emptySet();
private boolean hasFilter;
protected Filter(String filters) {
this.filters = filters.trim();
}
/**
* Perform the parsing of the filter string.
*
* @return true if filters need to be processed
*/
public boolean parse() {
if (StringUtils.isEmpty(filters)) {
return false;
}
try {
doParse();
return hasFilter();
} catch (RuntimeException e) {
String message = String.format(Locale.ROOT, "FILTER rule [%s] must be in the form of `%s:name1|name2|name3` or `%s:get|post|put` or `%s:tag1|tag2|tag3` or `%s:/v1|/v2`. Error: %s",
filters, Filter.OPERATION_ID, Filter.METHOD, Filter.TAG, Filter.PATH, e.getMessage());
// throw an exception. This is a breaking change compared to pre 7.16.0
// Workaround: fix the syntax!
throw new IllegalArgumentException(message);
}
}
private void doParse() {
for (String filter : filters.split(";")) {
filter = filter.trim();
String[] filterStrs = filter.split(":");
if (filterStrs.length != 2) { // only support filter with : at the moment
throw new IllegalArgumentException("filter with no value not supported :[" + filter + "]");
} else {
String filterKey = filterStrs[0].trim();
String filterValue = filterStrs[1];
Set<String> parsedFilters = splitByPipe(filterValue);
hasFilter = true;
if (OPERATION_ID.equals(filterKey)) {
operationIdFilters = parsedFilters;
} else if (METHOD.equals(filterKey)) {
methodFilters = parsedFilters;
} else if (TAG.equals(filterKey)) {
tagFilters = parsedFilters;
} else if (PATH.equals(filterKey)) {
pathStartingWithFilters = parsedFilters;
} else {
parse(filterKey, filterValue);
}
}
}
}
/**
* Split the filterValue by pipe.
*
* @return the split values.
*/
protected Set<String> splitByPipe(String filterValue) {
return Arrays.stream(filterValue.split("[|]"))
.filter(Objects::nonNull)
.map(String::trim)
.collect(Collectors.toCollection(HashSet::new));
}
/**
* Parse non default filters.
*
* Override this method to add custom parsing logic.
*
* By default throws IllegalArgumentException.
*
* @param filterName name of the filter
* @param filterValue value of the filter
*/
protected void parse(String filterName, String filterValue) {
parseFails(filterName, filterValue);
}
protected void parseFails(String filterName, String filterValue) {
throw new IllegalArgumentException("filter not supported :[" + filterName + ":" + filterValue + "]");
}
/**
* Test if the OpenAPI contract match an extra filter.
*
* Override this method to add custom logic.
*
* @param operation Openapi Operation
* @param path Path of the operation
*
* @return true if the operation of path match the filter
*/
protected boolean hasCustomFilterMatch(String path, Operation operation) {
return false;
}
public boolean hasFilter() {
return hasFilter;
}
public void apply(String path, PathItem pathItem, Map<String, Function<PathItem, Operation>> methodMap) {
methodMap.forEach((method, getter) -> {
Operation operation = getter.apply(pathItem);
if (operation != null) {
boolean found = false;
found |= logIfMatch(PATH, operation, hasPathStarting(path));
found |= logIfMatch(TAG, operation, hasTag(operation));
found |= logIfMatch(OPERATION_ID, operation, hasOperationId(operation));
found |= logIfMatch(METHOD, operation, hasMethod(method));
found |= hasCustomFilterMatch(path, operation);
operation.addExtension(X_INTERNAL, !found);
}
});
}
protected boolean logIfMatch(String filterName, Operation operation, boolean filterMatched) {
if (filterMatched) {
logMatch(filterName, operation);
}
return filterMatched;
}
protected void logMatch(String filterName, Operation operation) {
getLogger().info("operation `{}` marked as internal only (x-internal: true) by the {} FILTER", operation.getOperationId(), filterName);
}
protected Logger getLogger() {
return OpenAPINormalizer.LOGGER;
}
private boolean hasPathStarting(String path) {
return pathStartingWithFilters.stream().anyMatch(filter -> path.startsWith(filter));
}
private boolean hasTag( Operation operation) {
return operation.getTags() != null && operation.getTags().stream().anyMatch(tagFilters::contains);
}
private boolean hasOperationId(Operation operation) {
return operationIdFilters.contains(operation.getOperationId());
}
private boolean hasMethod(String method) {
return methodFilters.contains(method);
}
}
}

View File

@@ -27,9 +27,6 @@ public enum VendorExtension {
X_OPERATION_EXTRA_ANNOTATION("x-operation-extra-annotation", ExtensionLevel.OPERATION, "List of custom annotations to be added to operation", null),
X_VERSION_PARAM("x-version-param", ExtensionLevel.OPERATION_PARAMETER, "Marker property that tells that this parameter would be used for endpoint versioning. Applicable for headers & query params. true/false", null),
X_PATTERN_MESSAGE("x-pattern-message", Arrays.asList(ExtensionLevel.FIELD, ExtensionLevel.OPERATION_PARAMETER), "Add this property whenever you need to customize the invalidation error message for the regex pattern of a variable", null),
X_SIZE_MESSAGE("x-size-message", Arrays.asList(ExtensionLevel.FIELD, ExtensionLevel.OPERATION_PARAMETER), "Add this property whenever you need to customize the invalidation error message for the size or length of a variable", null),
X_MINIMUM_MESSAGE("x-minimum-message", Arrays.asList(ExtensionLevel.FIELD, ExtensionLevel.OPERATION_PARAMETER), "Add this property whenever you need to customize the invalidation error message for the minimum value of a variable", null),
X_MAXIMUM_MESSAGE("x-maximum-message", Arrays.asList(ExtensionLevel.FIELD, ExtensionLevel.OPERATION_PARAMETER), "Add this property whenever you need to customize the invalidation error message for the maximum value of a variable", null),
X_ZERO_BASED_ENUM("x-zero-based-enum", ExtensionLevel.MODEL, "When used on an enum, the index will not be generated and the default numbering will be used, zero-based", "false");
private final String name;

View File

@@ -1628,7 +1628,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen {
Schema<?> target = ModelUtils.isGenerateAliasAsModel() ? p : schema;
if (ModelUtils.isArraySchema(target)) {
Schema<?> items = getSchemaItems(schema);
return typeMapping.get("array") + "<" + getTypeDeclarationForArray(items) + ">";
return getSchemaType(target) + "<" + getTypeDeclarationForArray(items) + ">";
} else if (ModelUtils.isMapSchema(p)) {
// Should we also support maps of maps?
Schema<?> inner = ModelUtils.getAdditionalProperties(p);

View File

@@ -119,7 +119,6 @@ public abstract class AbstractJavaJAXRSServerCodegen extends AbstractJavaCodegen
convertPropertyToStringAndWriteBack(CodegenConstants.IMPL_FOLDER, this::setImplFolder);
convertPropertyToBooleanAndWriteBack(USE_BEANVALIDATION, this::setUseBeanValidation);
convertPropertyToBooleanAndWriteBack(USE_TAGS, this::setUseTags);
convertPropertyToBooleanAndWriteBack(JACKSON, this::setJackson);
}
@Override

View File

@@ -34,7 +34,6 @@ import io.swagger.v3.oas.models.media.Schema;
import io.swagger.v3.oas.models.parameters.Parameter;
import io.swagger.v3.oas.models.parameters.RequestBody;
import io.swagger.v3.oas.models.security.SecurityScheme;
import org.apache.commons.lang3.Strings;
import org.apache.commons.lang3.StringUtils;
import org.openapitools.codegen.*;
import org.openapitools.codegen.meta.features.DocumentationFeature;
@@ -602,7 +601,7 @@ public abstract class AbstractPythonConnexionServerCodegen extends AbstractPytho
@Override
public String toModelImport(String name) {
String modelImport;
if (Strings.CS.startsWithAny(name, "import", "from")) {
if (StringUtils.startsWithAny(name, "import", "from")) {
modelImport = name;
} else {
modelImport = "from ";

View File

@@ -17,7 +17,6 @@
package org.openapitools.codegen.languages;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.google.common.collect.Iterables;
import com.samskivert.mustache.Mustache;
import io.swagger.v3.oas.models.media.Schema;
@@ -441,17 +440,6 @@ public class GoClientCodegen extends AbstractGoCodegen {
return null;
}
if (ModelUtils.isArraySchema(p)) {
StringJoiner joinedDefaultValues = new StringJoiner(", ");
Object defaultValues = p.getDefault();
if (defaultValues instanceof ArrayNode) {
for (var value : (ArrayNode) defaultValues) {
joinedDefaultValues.add(value.toString());
}
return "{" + joinedDefaultValues + "}";
}
}
return super.toDefaultValue(p);
}

View File

@@ -187,22 +187,19 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen {
supportingFiles.clear(); // Don't need extra files provided by AbstractJAX-RS & Java Codegen
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")
.doNotOverwrite());
if (!interfaceOnly) {
supportingFiles.add(new SupportingFile("RestResourceRoot.mustache",
(sourceFolder + '/' + invokerPackage).replace(".", "/"), "RestResourceRoot.java")
.doNotOverwrite());
supportingFiles.add(new SupportingFile("RestApplication.mustache",
(sourceFolder + '/' + invokerPackage).replace(".", "/"), "RestApplication.java")
.doNotOverwrite());
}
supportingFiles.add(new SupportingFile("RestResourceRoot.mustache",
(sourceFolder + '/' + invokerPackage).replace(".", "/"), "RestResourceRoot.java")
.doNotOverwrite());
if (generatePom) {
supportingFiles.add(new SupportingFile("pom.mustache", "", "pom.xml")
.doNotOverwrite());
}
supportingFiles.add(new SupportingFile("RestApplication.mustache",
(sourceFolder + '/' + invokerPackage).replace(".", "/"), "RestApplication.java")
.doNotOverwrite());
if (StringUtils.isNotEmpty(openApiSpecFileLocation)) {
int index = openApiSpecFileLocation.lastIndexOf('/');
String fileFolder;
@@ -279,7 +276,6 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen {
if (!jackson) {
codegenModel.imports.remove("JsonValue");
codegenModel.imports.remove("JsonProperty");
codegenModel.imports.remove("JsonTypeName");
}
return codegenModel;
}

View File

@@ -1012,9 +1012,6 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
extensions.add(VendorExtension.X_DISCRIMINATOR_VALUE);
extensions.add(VendorExtension.X_FIELD_EXTRA_ANNOTATION);
extensions.add(VendorExtension.X_PATTERN_MESSAGE);
extensions.add(VendorExtension.X_SIZE_MESSAGE);
extensions.add(VendorExtension.X_MINIMUM_MESSAGE);
extensions.add(VendorExtension.X_MAXIMUM_MESSAGE);
extensions.add(VendorExtension.X_KOTLIN_IMPLEMENTS);
extensions.add(VendorExtension.X_KOTLIN_IMPLEMENTS_FIELDS);
return extensions;

View File

@@ -20,7 +20,7 @@ package org.openapitools.codegen.languages;
import io.swagger.v3.oas.models.media.Schema;
import io.swagger.v3.oas.models.security.SecurityScheme;
import lombok.Setter;
import org.apache.commons.lang3.Strings;
import org.apache.commons.lang3.StringUtils;
import org.openapitools.codegen.*;
import org.openapitools.codegen.meta.GeneratorMetadata;
import org.openapitools.codegen.meta.Stability;
@@ -355,7 +355,7 @@ public class PythonClientCodegen extends AbstractPythonCodegen implements Codege
@Override
public String toModelImport(String name) {
String modelImport;
if (Strings.CS.startsWithAny(name, "import", "from")) {
if (StringUtils.startsWithAny(name, "import", "from")) {
modelImport = name;
} else {
modelImport = "from ";

View File

@@ -23,7 +23,6 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.module.SimpleModule;
import io.swagger.v3.oas.models.media.Schema;
import org.apache.commons.lang3.Strings;
import org.apache.commons.lang3.StringUtils;
import org.openapitools.codegen.*;
import org.openapitools.codegen.meta.GeneratorMetadata;
@@ -90,11 +89,6 @@ public class PythonFastAPIServerCodegen extends AbstractPythonCodegen {
public PythonFastAPIServerCodegen() {
super();
// Skip sorting of operations to preserve the order found in the OpenAPI spec file. See
// https://fastapi.tiangolo.com/tutorial/path-params/?h=path#order-matters for details on why order matters.
LOGGER.info("Skipping sorting of path operations, order matters, let the developer decide via their specification file.");
setSkipSortingOperations(true);
modifyFeatureSet(features -> features.includeSecurityFeatures(
SecurityFeature.OAuth2_AuthorizationCode,
SecurityFeature.OAuth2_Password
@@ -204,7 +198,7 @@ public class PythonFastAPIServerCodegen extends AbstractPythonCodegen {
@Override
public String toModelImport(String name) {
String modelImport;
if (Strings.CS.startsWithAny(name, "import", "from")) {
if (StringUtils.startsWithAny(name, "import", "from")) {
modelImport = name;
} else {
modelImport = "from ";

View File

@@ -20,7 +20,6 @@ package org.openapitools.codegen.languages;
import io.swagger.v3.oas.models.media.Schema;
import io.swagger.v3.oas.models.security.SecurityScheme;
import lombok.Setter;
import org.apache.commons.lang3.Strings;
import org.apache.commons.lang3.StringUtils;
import org.openapitools.codegen.*;
import org.openapitools.codegen.meta.GeneratorMetadata;
@@ -354,7 +353,7 @@ public class PythonPydanticV1ClientCodegen extends AbstractPythonPydanticV1Codeg
@Override
public String toModelImport(String name) {
String modelImport;
if (Strings.CS.startsWithAny(name, "import", "from")) {
if (StringUtils.startsWithAny(name, "import", "from")) {
modelImport = name;
} else {
modelImport = "from ";

View File

@@ -648,7 +648,7 @@ public class RustAxumServerCodegen extends AbstractRustCodegen implements Codege
}
private void postProcessPolymorphism(final List<ModelMap> allModels) {
final HashMap<String, List<CodegenDiscriminator>> discriminatorsForModel = new HashMap<>();
final HashMap<String, List<String>> discriminatorsForModel = new HashMap<>();
for (final ModelMap mo : allModels) {
final CodegenModel cm = mo.getModel();
@@ -656,17 +656,15 @@ public class RustAxumServerCodegen extends AbstractRustCodegen implements Codege
final CodegenComposedSchemas cs = cm.getComposedSchemas();
if (cs != null) {
final List<CodegenProperty> csOneOf = cs.getOneOf();
CodegenDiscriminator discriminator = cm.getDiscriminator();
if (csOneOf != null) {
processPolymorphismDataType(csOneOf, discriminator);
processPolymorphismDataType(csOneOf);
cs.setOneOf(csOneOf);
cm.setComposedSchemas(cs);
}
final List<CodegenProperty> csAnyOf = cs.getAnyOf();
if (csAnyOf != null) {
processPolymorphismDataType(csAnyOf, discriminator);
processPolymorphismDataType(csAnyOf);
cs.setAnyOf(csAnyOf);
cm.setComposedSchemas(cs);
}
@@ -674,14 +672,14 @@ public class RustAxumServerCodegen extends AbstractRustCodegen implements Codege
if (cm.discriminator != null) {
for (final String model : cm.oneOf) {
final List<CodegenDiscriminator> discriminators = discriminatorsForModel.getOrDefault(model, new ArrayList<>());
discriminators.add(cm.discriminator);
final List<String> discriminators = discriminatorsForModel.getOrDefault(model, new ArrayList<>());
discriminators.add(cm.discriminator.getPropertyName());
discriminatorsForModel.put(model, discriminators);
}
for (final String model : cm.anyOf) {
final List<CodegenDiscriminator> discriminators = discriminatorsForModel.getOrDefault(model, new ArrayList<>());
discriminators.add(cm.discriminator);
final List<String> discriminators = discriminatorsForModel.getOrDefault(model, new ArrayList<>());
discriminators.add(cm.discriminator.getPropertyName());
discriminatorsForModel.put(model, discriminators);
}
}
@@ -691,11 +689,11 @@ public class RustAxumServerCodegen extends AbstractRustCodegen implements Codege
for (ModelMap mo : allModels) {
final CodegenModel cm = mo.getModel();
final List<CodegenDiscriminator> discriminators = discriminatorsForModel.get(cm.getSchemaName());
final List<String> discriminators = discriminatorsForModel.get(cm.getSchemaName());
if (discriminators != null) {
// If the discriminator field is not a defined attribute in the variant structure, create it.
if (!discriminating(discriminators, cm)) {
final CodegenDiscriminator discriminator = discriminators.get(0);
final String discriminator = discriminators.get(0);
CodegenProperty property = new CodegenProperty();
@@ -712,18 +710,17 @@ public class RustAxumServerCodegen extends AbstractRustCodegen implements Codege
property.isDiscriminator = true;
// Attributes based on the discriminator value
property.baseName = discriminator.getPropertyBaseName();
property.name = discriminator.getPropertyName();
property.nameInCamelCase = camelize(discriminator.getPropertyName());
property.baseName = discriminator;
property.name = discriminator;
property.nameInCamelCase = camelize(discriminator);
property.nameInPascalCase = property.nameInCamelCase.substring(0, 1).toUpperCase(Locale.ROOT) + property.nameInCamelCase.substring(1);
property.nameInSnakeCase = underscore(discriminator.getPropertyName()).toUpperCase(Locale.ROOT);
property.nameInSnakeCase = underscore(discriminator).toUpperCase(Locale.ROOT);
property.getter = String.format(Locale.ROOT, "get%s", property.nameInPascalCase);
property.setter = String.format(Locale.ROOT, "set%s", property.nameInPascalCase);
property.defaultValueWithParam = String.format(Locale.ROOT, " = data.%s;", property.name);
// Attributes based on the model name
property.defaultValue = String.format(Locale.ROOT, "r#\"%s\"#.to_string()", cm.getSchemaName());
property.discriminatorValue = getDiscriminatorValue(cm.getClassname(), discriminator);
property.jsonSchema = String.format(Locale.ROOT, "{ \"default\":\"%s\"; \"type\":\"string\" }", cm.getSchemaName());
cm.vars.add(property);
@@ -746,27 +743,14 @@ public class RustAxumServerCodegen extends AbstractRustCodegen implements Codege
}
}
private static String getDiscriminatorValue(String modelName, CodegenDiscriminator discriminator) {
if (discriminator == null || discriminator.getMappedModels() == null) {
return modelName;
}
return discriminator
.getMappedModels()
.stream()
.filter(m -> m.getModelName().equals(modelName) && m.getMappingName() != null)
.map(CodegenDiscriminator.MappedModel::getMappingName)
.findFirst()
.orElse(modelName);
}
private static boolean discriminating(final List<CodegenDiscriminator> discriminatorsForModel, final CodegenModel cm) {
private static boolean discriminating(final List<String> discriminatorsForModel, final CodegenModel cm) {
resetDiscriminatorProperty(cm);
// Discriminator will be presented as enum tag -> One and only one tag is allowed
int countString = 0;
int countNonString = 0;
for (final CodegenProperty var : cm.vars) {
if (discriminatorsForModel.stream().anyMatch(discriminator -> var.baseName.equals(discriminator.getPropertyBaseName()) || var.name.equals(discriminator.getPropertyName()))) {
if (discriminatorsForModel.stream().anyMatch(discriminator -> var.baseName.equals(discriminator) || var.name.equals(discriminator))) {
if (var.isString) {
var.isDiscriminator = true;
++countString;
@@ -789,7 +773,7 @@ public class RustAxumServerCodegen extends AbstractRustCodegen implements Codege
}
}
private static void processPolymorphismDataType(final List<CodegenProperty> cp, CodegenDiscriminator discriminator) {
private static void processPolymorphismDataType(final List<CodegenProperty> cp) {
final HashSet<String> dedupDataTypeWithEnum = new HashSet<>();
final HashMap<String, Integer> dedupDataType = new HashMap<>();
@@ -799,7 +783,6 @@ public class RustAxumServerCodegen extends AbstractRustCodegen implements Codege
// Mainly needed for primitive types.
model.datatypeWithEnum = camelize(model.dataType.replaceAll("(?:\\w+::)+(\\w+)", "$1")
.replace("<", "Of").replace(">", "")).replace(" ", "").replace(",", "");
model.discriminatorValue = getDiscriminatorValue(model.datatypeWithEnum, discriminator);
if (!dedupDataTypeWithEnum.add(model.datatypeWithEnum)) {
model.datatypeWithEnum += ++idx;
}

View File

@@ -1408,7 +1408,6 @@ public class RustServerCodegen extends AbstractRustCodegen implements CodegenCon
*
* @deprecated Avoid using this - use a different mechanism instead.
*/
@Deprecated
private static String stripNullable(String type) {
if (type.startsWith("swagger::Nullable<") && type.endsWith(">")) {
return type.substring("swagger::Nullable<".length(), type.length() - 1);

View File

@@ -1408,7 +1408,6 @@ public class RustServerCodegenDeprecated extends AbstractRustCodegen implements
*
* @deprecated Avoid using this - use a different mechanism instead.
*/
@Deprecated
private static String stripNullable(String type) {
if (type.startsWith("swagger::Nullable<") && type.endsWith(">")) {
return type.substring("swagger::Nullable<".length(), type.length() - 1);

View File

@@ -568,8 +568,12 @@ public class SpringCodegen extends AbstractJavaCodegen
(sourceFolder + File.separator + apiPackage).replace(".", java.io.File.separator), "ApiUtil.java"));
}
if (!delegatePattern || delegateMethod) {
additionalProperties.put("jdk8-no-delegate", true);
}
if (delegatePattern && !delegateMethod) {
additionalProperties.put("isDelegate", true);
additionalProperties.put("isDelegate", "true");
apiTemplateFiles.put("apiDelegate.mustache", "Delegate.java");
}
@@ -1213,9 +1217,6 @@ public class SpringCodegen extends AbstractJavaCodegen
extensions.add(VendorExtension.X_SPRING_PAGINATED);
extensions.add(VendorExtension.X_VERSION_PARAM);
extensions.add(VendorExtension.X_PATTERN_MESSAGE);
extensions.add(VendorExtension.X_SIZE_MESSAGE);
extensions.add(VendorExtension.X_MINIMUM_MESSAGE);
extensions.add(VendorExtension.X_MAXIMUM_MESSAGE);
extensions.add(VendorExtension.X_SPRING_API_VERSION);
return extensions;
}

View File

@@ -461,9 +461,6 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode
}
}
// backup path in extensions
op.vendorExtensions.put("x-path-from-spec", op.path);
// Overwrite path to TypeScript template string, after applying everything we just did.
op.path = pathBuffer.toString();
}

View File

@@ -52,7 +52,6 @@ public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodege
public static final String USE_SQUARE_BRACKETS_IN_ARRAY_NAMES = "useSquareBracketsInArrayNames";
public static final String AXIOS_VERSION = "axiosVersion";
public static final String DEFAULT_AXIOS_VERSION = "^1.6.1";
public static final String WITH_AWSV4_SIGNATURE = "withAWSV4Signature";
@Getter @Setter
protected String npmRepository = null;
@@ -61,7 +60,6 @@ public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodege
@Getter @Setter
protected String axiosVersion = DEFAULT_AXIOS_VERSION;
protected boolean withAWSV4Signature = false;
private String tsModelPackage = "";
@@ -73,7 +71,7 @@ public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodege
modifyFeatureSet(features -> features
.includeDocumentationFeatures(DocumentationFeature.Readme)
.includeSecurityFeatures(SecurityFeature.BearerToken, SecurityFeature.AWSV4Signature));
.includeSecurityFeatures(SecurityFeature.BearerToken));
// clear import mapping (from default generator) as TS does not use it
// at the moment
@@ -96,7 +94,6 @@ public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodege
this.cliOptions.add(new CliOption(IMPORT_FILE_EXTENSION_SWITCH, IMPORT_FILE_EXTENSION_SWITCH_DESC, SchemaTypeUtil.STRING_TYPE).defaultValue(this.importFileExtension));
this.cliOptions.add(new CliOption(USE_SQUARE_BRACKETS_IN_ARRAY_NAMES, "Setting this property to true will add brackets to array attribute names, e.g. my_values[].", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString()));
this.cliOptions.add(new CliOption(AXIOS_VERSION, "Use this property to override the axios version in package.json").defaultValue(DEFAULT_AXIOS_VERSION));
this.cliOptions.add(new CliOption(WITH_AWSV4_SIGNATURE, "whether to include AWS v4 signature support", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString()));
// Templates have no mapping between formatted property names and original base names so use only "original" and remove this option
removeOption(CodegenConstants.MODEL_PROPERTY_NAMING);
}
@@ -185,10 +182,6 @@ public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodege
setAxiosVersion(additionalProperties.get(AXIOS_VERSION).toString());
}
additionalProperties.put("axiosVersion", getAxiosVersion());
if (additionalProperties.containsKey(CodegenConstants.WITH_AWSV4_SIGNATURE_COMMENT)) {
this.setWithAWSV4Signature(Boolean.parseBoolean(additionalProperties.get(CodegenConstants.WITH_AWSV4_SIGNATURE_COMMENT).toString()));
}
additionalProperties.put(CodegenConstants.WITH_AWSV4_SIGNATURE_COMMENT, withAWSV4Signature);
}
@@ -314,10 +307,6 @@ public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodege
return (outputFolder + "/" + modelDocPath).replace('/', File.separatorChar);
}
public void setWithAWSV4Signature(boolean withAWSV4Signature) {
this.withAWSV4Signature = withAWSV4Signature;
}
/**
* Overriding toRegularExpression() to avoid escapeText() being called,
* as it would return a broken regular expression if any escaped character / metacharacter were present.

View File

@@ -117,7 +117,7 @@ ext {
jackson_version = "2.19.2"
jackson_databind_version = "2.19.2"
{{#openApiNullable}}
jackson_databind_nullable_version = "0.2.8"
jackson_databind_nullable_version = "0.2.7"
{{/openApiNullable}}
jakarta_annotation_version = "1.3.5"
{{#useBeanValidation}}

View File

@@ -117,7 +117,7 @@ ext {
jackson_version = "2.19.2"
jackson_databind_version = "2.19.2"
{{#openApiNullable}}
jackson_databind_nullable_version = "0.2.8"
jackson_databind_nullable_version = "0.2.7"
{{/openApiNullable}}
jakarta_annotation_version = "1.3.5"
httpclient_version = "5.1.3"

View File

@@ -354,7 +354,7 @@
<jackson-version>2.19.2</jackson-version>
<jackson-databind-version>2.19.2</jackson-databind-version>
{{#openApiNullable}}
<jackson-databind-nullable-version>0.2.8</jackson-databind-nullable-version>
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
{{/openApiNullable}}
{{#useJakartaEe}}
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>

View File

@@ -107,7 +107,7 @@ ext {
jackson_databind_version = "2.19.2"
{{/jackson}}
{{#openApiNullable}}
jackson_databind_nullable_version = "0.2.8"
jackson_databind_nullable_version = "0.2.7"
{{/openApiNullable}}
jakarta_annotation_version = "1.3.5"
feign_version = "13.5"

View File

@@ -63,7 +63,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
@SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}})
{{/gson}}
{{#vendorExtensions.x-field-extra-annotation}}
{{{.}}}
{{{vendorExtensions.x-field-extra-annotation}}}
{{/vendorExtensions.x-field-extra-annotation}}
{{#vendorExtensions.x-is-jackson-optional-nullable}}
{{#isContainer}}

View File

@@ -416,7 +416,7 @@
<gson-version>2.10.1</gson-version>
{{/gson}}
{{#openApiNullable}}
<jackson-databind-nullable-version>0.2.8</jackson-databind-nullable-version>
<jackson-databind-nullable-version>0.2.6</jackson-databind-nullable-version>
{{/openApiNullable}}
{{#useJakartaEe}}
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>

View File

@@ -101,7 +101,7 @@ ext {
jackson_version = "2.19.2"
jackson_databind_version = "2.19.2"
{{#openApiNullable}}
jackson_databind_nullable_version = "0.2.8"
jackson_databind_nullable_version = "0.2.7"
{{/openApiNullable}}
jakarta_annotation_version = "1.3.5"
google_api_client_version = "1.32.2"

View File

@@ -313,7 +313,7 @@
<jackson-version>2.19.2</jackson-version>
<jackson-databind-version>2.19.2</jackson-databind-version>
{{#openApiNullable}}
<jackson-databind-nullable-version>0.2.8</jackson-databind-nullable-version>
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
{{/openApiNullable}}
{{#joda}}
<jodatime-version>2.9.9</jodatime-version>

View File

@@ -107,7 +107,7 @@ ext {
jackson_version = "2.19.2"
jackson_databind_version = "2.19.2"
{{#openApiNullable}}
jackson_databind_nullable_version = "0.2.8"
jackson_databind_nullable_version = "0.2.7"
{{/openApiNullable}}
jakarta_annotation_version = "1.3.5"
{{#useBeanValidation}}

View File

@@ -24,7 +24,7 @@ lazy val root = (project in file(".")).
{{/joda}}
"com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.19.2" % "compile",
{{#openApiNullable}}
"org.openapitools" % "jackson-databind-nullable" % "0.2.8" % "compile",
"org.openapitools" % "jackson-databind-nullable" % "0.2.7" % "compile",
{{/openApiNullable}}
{{#hasOAuthMethods}}
"com.github.scribejava" % "scribejava-apis" % "8.3.1" % "compile",

View File

@@ -63,7 +63,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
@SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}})
{{/gson}}
{{#vendorExtensions.x-field-extra-annotation}}
{{{.}}}
{{{vendorExtensions.x-field-extra-annotation}}}
{{/vendorExtensions.x-field-extra-annotation}}
{{#vendorExtensions.x-is-jackson-optional-nullable}}
{{#isContainer}}

View File

@@ -407,7 +407,7 @@
<jersey-version>2.37</jersey-version>
<jackson-version>2.19.2</jackson-version>
<jackson-databind-version>2.19.2</jackson-databind-version>
<jackson-databind-nullable-version>0.2.8</jackson-databind-nullable-version>
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
{{#useJakartaEe}}
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>
<beanvalidation-version>3.0.2</beanvalidation-version>

View File

@@ -102,7 +102,7 @@ ext {
jackson_version = "2.19.2"
jackson_databind_version = "2.19.2"
{{#openApiNullable}}
jackson_databind_nullable_version = "0.2.8"
jackson_databind_nullable_version = "0.2.7"
{{/openApiNullable}}
jakarta_annotation_version = "2.1.0"
{{#useBeanValidation}}

View File

@@ -24,7 +24,7 @@ lazy val root = (project in file(".")).
{{/joda}}
"com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.19.2" % "compile",
{{#openApiNullable}}
"org.openapitools" % "jackson-databind-nullable" % "0.2.8" % "compile",
"org.openapitools" % "jackson-databind-nullable" % "0.2.7" % "compile",
{{/openApiNullable}}
{{#hasOAuthMethods}}
"com.github.scribejava" % "scribejava-apis" % "8.3.1" % "compile",

View File

@@ -63,7 +63,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
@SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}})
{{/gson}}
{{#vendorExtensions.x-field-extra-annotation}}
{{{.}}}
{{{vendorExtensions.x-field-extra-annotation}}}
{{/vendorExtensions.x-field-extra-annotation}}
{{#vendorExtensions.x-is-jackson-optional-nullable}}
{{#isContainer}}

View File

@@ -407,7 +407,7 @@
<jersey-version>3.1.1</jersey-version>
<jackson-version>2.19.2</jackson-version>
<jackson-databind-version>2.19.2</jackson-databind-version>
<jackson-databind-nullable-version>0.2.8</jackson-databind-nullable-version>
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
{{#useJakartaEe}}
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>
<beanvalidation-version>3.0.2</beanvalidation-version>

View File

@@ -49,7 +49,7 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#vendorExtensi
{{#jsonb}}{{^isDiscriminator}}@JsonbProperty("{{baseName}}"){{/isDiscriminator}}{{#isDiscriminator}}{{#jsonbPolymorphism}}@JsonbTransient{{/jsonbPolymorphism}}{{^jsonbPolymorphism}}@JsonbProperty("{{baseName}}"){{/jsonbPolymorphism}}{{/isDiscriminator}}{{/jsonb}}
{{/withXml}}
{{#vendorExtensions.x-field-extra-annotation}}
{{{.}}}
{{{vendorExtensions.x-field-extra-annotation}}}
{{/vendorExtensions.x-field-extra-annotation}}
{{#isContainer}}
private {{{datatypeWithEnum}}} {{name}}{{#required}} = {{{defaultValue}}}{{/required}}{{^required}} = null{{/required}};

View File

@@ -223,7 +223,7 @@
<swagger.core.version>1.5.18</swagger.core.version>
<jetty.version>9.2.9.v20150224</jetty.version>
<junit.version>5.10.2</junit.version>
<logback.version>1.5.19</logback.version>
<logback.version>1.5.13</logback.version>
{{#useBeanValidation}}
<beanvalidation.version>3.0.2</beanvalidation.version>
{{/useBeanValidation}}

View File

@@ -223,7 +223,7 @@
<swagger.core.version>1.5.18</swagger.core.version>
<jetty.version>9.2.9.v20150224</jetty.version>
<junit.version>5.10.2</junit.version>
<logback.version>1.5.19</logback.version>
<logback.version>1.5.13</logback.version>
{{#useBeanValidation}}
<beanvalidation.version>3.0.1</beanvalidation.version>
{{/useBeanValidation}}

View File

@@ -102,7 +102,7 @@ dependencies {
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
implementation "org.openapitools:jackson-databind-nullable:0.2.8"
implementation "org.openapitools:jackson-databind-nullable:0.2.7"
implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"
{{#useBeanValidation}}
implementation "jakarta.validation:jakarta.validation-api:$beanvalidation_version"

View File

@@ -66,7 +66,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
@SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}})
{{/gson}}
{{#vendorExtensions.x-field-extra-annotation}}
{{{.}}}
{{{vendorExtensions.x-field-extra-annotation}}}
{{/vendorExtensions.x-field-extra-annotation}}
{{#vendorExtensions.x-is-jackson-optional-nullable}}
{{#isContainer}}

View File

@@ -300,7 +300,7 @@
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<jackson-version>2.19.2</jackson-version>
<jackson-databind-nullable-version>0.2.8</jackson-databind-nullable-version>
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
{{#useJakartaEe}}
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>
<beanvalidation-version>3.0.2</beanvalidation-version>

View File

@@ -132,7 +132,7 @@ dependencies {
implementation 'io.gsonfire:gson-fire:1.9.0'
implementation 'jakarta.ws.rs:jakarta.ws.rs-api:2.1.6'
{{#openApiNullable}}
implementation 'org.openapitools:jackson-databind-nullable:0.2.8'
implementation 'org.openapitools:jackson-databind-nullable:0.2.7'
{{/openApiNullable}}
{{#withAWSV4Signature}}
implementation 'software.amazon.awssdk:auth:2.20.157'

View File

@@ -16,7 +16,7 @@ lazy val root = (project in file(".")).
"org.apache.commons" % "commons-lang3" % "3.18.0",
"jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6",
{{#openApiNullable}}
"org.openapitools" % "jackson-databind-nullable" % "0.2.8",
"org.openapitools" % "jackson-databind-nullable" % "0.2.7",
{{/openApiNullable}}
{{#withAWSV4Signature}}
"software.amazon.awssdk" % "auth" % "2.20.157",

View File

@@ -71,7 +71,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
{{/deprecated}}
@SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}})
{{#vendorExtensions.x-field-extra-annotation}}
{{{.}}}
{{{vendorExtensions.x-field-extra-annotation}}}
{{/vendorExtensions.x-field-extra-annotation}}
{{>nullable_var_annotations}}{{! prevent indent}}
{{#isDiscriminator}}protected{{/isDiscriminator}}{{^isDiscriminator}}private{{/isDiscriminator}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};

View File

@@ -416,7 +416,7 @@
<gson-version>2.10.1</gson-version>
<commons-lang3-version>3.18.0</commons-lang3-version>
{{#openApiNullable}}
<jackson-databind-nullable-version>0.2.8</jackson-databind-nullable-version>
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
{{/openApiNullable}}
{{#joda}}
<jodatime-version>2.12.0</jodatime-version>

View File

@@ -109,7 +109,7 @@ ext {
jackson_version = "2.19.2"
jackson_databind_version = "2.19.2"
{{#openApiNullable}}
jackson_databind_nullable_version = "0.2.8"
jackson_databind_nullable_version = "0.2.7"
{{/openApiNullable}}
{{/jackson}}
{{#gson}}

View File

@@ -18,7 +18,7 @@ lazy val root = (project in file(".")).
"com.fasterxml.jackson.core" % "jackson-annotations" % "2.19.2",
"com.fasterxml.jackson.core" % "jackson-databind" % "2.19.2",
{{#openApiNullable}}
"org.openapitools" % "jackson-databind-nullable" % "0.2.8",
"org.openapitools" % "jackson-databind-nullable" % "0.2.7",
{{/openApiNullable}}
{{#withXml}}
"com.fasterxml.jackson.dataformat" % "jackson-dataformat-xml" % "2.13.4.1",

View File

@@ -354,7 +354,7 @@
{{#jackson}}
<jackson-version>2.19.2</jackson-version>
<jackson-databind-version>2.19.2</jackson-databind-version>
<jackson-databind-nullable-version>0.2.8</jackson-databind-nullable-version>
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
{{/jackson}}
{{#useJakartaEe}}
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>

View File

@@ -106,7 +106,7 @@ ext {
jackson_version = "2.19.2"
jackson_databind_version = "2.19.2"
{{#openApiNullable}}
jackson_databind_nullable_version = "0.2.8"
jackson_databind_nullable_version = "0.2.7"
{{/openApiNullable}}
spring_web_version = "6.1.21"
jakarta_annotation_version = "2.1.1"

View File

@@ -74,7 +74,7 @@ public {{>sealed}}class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#v
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
{{/isDiscriminator}}
{{#vendorExtensions.x-field-extra-annotation}}
{{{.}}}
{{{vendorExtensions.x-field-extra-annotation}}}
{{/vendorExtensions.x-field-extra-annotation}}
{{#vendorExtensions.x-is-jackson-optional-nullable}}
{{#isContainer}}

View File

@@ -350,7 +350,7 @@
<jackson-version>2.19.2</jackson-version>
<jackson-databind-version>2.19.2</jackson-databind-version>
{{#openApiNullable}}
<jackson-databind-nullable-version>0.2.8</jackson-databind-nullable-version>
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
{{/openApiNullable}}
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>
{{#joda}}

View File

@@ -101,7 +101,7 @@ ext {
jackson_version = "2.19.2"
jackson_databind_version = "2.19.2"
{{#openApiNullable}}
jackson_databind_nullable_version = "0.2.8"
jackson_databind_nullable_version = "0.2.7"
{{/openApiNullable}}
jakarta_annotation_version = "1.3.5"
threetenbp_version = "2.9.10"

View File

@@ -301,7 +301,7 @@
<jackson-version>2.19.2</jackson-version>
<jackson-databind-version>2.19.2</jackson-databind-version>
{{#openApiNullable}}
<jackson-databind-nullable-version>0.2.8</jackson-databind-nullable-version>
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
{{/openApiNullable}}
{{#useJakartaEe}}
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>

View File

@@ -118,7 +118,7 @@ ext {
jackson_version = "2.19.2"
jackson_databind_version = "2.19.2"
{{#openApiNullable}}
jackson_databind_nullable_version = "0.2.8"
jackson_databind_nullable_version = "0.2.7"
{{/openApiNullable}}
{{#useJakartaEe}}
spring_web_version = "6.2.8"

View File

@@ -74,7 +74,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
{{/isDiscriminator}}
{{#vendorExtensions.x-field-extra-annotation}}
{{{.}}}
{{{vendorExtensions.x-field-extra-annotation}}}
{{/vendorExtensions.x-field-extra-annotation}}
{{#vendorExtensions.x-is-jackson-optional-nullable}}
{{#isContainer}}

View File

@@ -364,7 +364,7 @@
<jackson-version>2.19.2</jackson-version>
<jackson-databind-version>2.19.2</jackson-databind-version>
{{#openApiNullable}}
<jackson-databind-nullable-version>0.2.8</jackson-databind-nullable-version>
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
{{/openApiNullable}}
{{#useJakartaEe}}
<spring-web-version>6.2.8</spring-web-version>

View File

@@ -104,7 +104,7 @@ ext {
jackson_databind_version = "2.19.2"
javax_ws_rs_api_version = "2.1.1"
{{#openApiNullable}}
jackson_databind_nullable_version = "0.2.8"
jackson_databind_nullable_version = "0.2.7"
{{/openApiNullable}}
{{/jackson}}
{{#usePlayWS}}

View File

@@ -386,7 +386,7 @@
<jackson-databind-version>2.19.2</jackson-databind-version>
<jackson-version>2.19.2</jackson-version>
{{#openApiNullable}}
<jackson-databind-nullable-version>0.2.8</jackson-databind-nullable-version>
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
{{/openApiNullable}}
<javax.ws.rs-api-version>2.1.1</javax.ws.rs-api-version>
{{/jackson}}

View File

@@ -35,7 +35,7 @@ ext {
vertx_version = "{{#supportVertxFuture}}4.0.0{{/supportVertxFuture}}{{^supportVertxFuture}}3.5.2{{/supportVertxFuture}}"
junit_version = "5.10.3"
{{#openApiNullable}}
jackson_databind_nullable_version = "0.2.8"
jackson_databind_nullable_version = "0.2.7"
{{/openApiNullable}}
jakarta_annotation_version = "1.3.5"
}

View File

@@ -308,7 +308,7 @@
{{/swagger2AnnotationLibrary}}
<jackson-version>2.19.2</jackson-version>
<jackson-databind>2.19.2</jackson-databind>
<jackson-databind-nullable-version>0.2.8</jackson-databind-nullable-version>
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
{{#useJakartaEe}}
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>
{{/useJakartaEe}}

View File

@@ -147,7 +147,7 @@ ext {
jackson_version = "2.19.2"
jackson_databind_version = "2.19.2"
{{#openApiNullable}}
jackson_databind_nullable_version = "0.2.8"
jackson_databind_nullable_version = "0.2.7"
{{/openApiNullable}}
{{#joda}}
jodatime_version = "2.9.9"

View File

@@ -74,7 +74,7 @@ public {{>sealed}}class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#v
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
{{/isDiscriminator}}
{{#vendorExtensions.x-field-extra-annotation}}
{{{.}}}
{{{vendorExtensions.x-field-extra-annotation}}}
{{/vendorExtensions.x-field-extra-annotation}}
{{#vendorExtensions.x-is-jackson-optional-nullable}}
{{#isContainer}}

View File

@@ -170,7 +170,7 @@
<jackson-version>2.19.2</jackson-version>
<jackson-databind-version>2.19.2</jackson-databind-version>
{{#openApiNullable}}
<jackson-databind-nullable-version>0.2.8</jackson-databind-nullable-version>
<jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
{{/openApiNullable}}
{{#useJakartaEe}}
<spring-boot-version>3.2.12</spring-boot-version>

View File

@@ -74,7 +74,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
// The discriminator does not have Nullability-annotation since it is added during serialization by the @JsonTypeName annotation
{{/isDiscriminator}}
{{#vendorExtensions.x-field-extra-annotation}}
{{{.}}}
{{{vendorExtensions.x-field-extra-annotation}}}
{{/vendorExtensions.x-field-extra-annotation}}
{{#vendorExtensions.x-is-jackson-optional-nullable}}
{{#isContainer}}

View File

@@ -162,7 +162,7 @@
<maven-plugin-version>1.0.0</maven-plugin-version>
<swagger-inflector-version>1.0.14</swagger-inflector-version>
<jetty-version>9.2.9.v20150224</jetty-version>
<logback-version>1.5.19</logback-version>
<logback-version>1.5.13</logback-version>
{{#useJakartaEe}}
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>
{{/useJakartaEe}}

View File

@@ -16,7 +16,7 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtens
{{>enumClass}}{{/mostInnerItems}}{{/isContainer}}{{/isEnum}}
{{#vendorExtensions.x-field-extra-annotation}}
{{{.}}}
{{{vendorExtensions.x-field-extra-annotation}}}
{{/vendorExtensions.x-field-extra-annotation}}
private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};
{{/vars}}

View File

@@ -49,7 +49,7 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#vendorExtensi
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'hh:mm:ss.SSSX")
{{/isDateTime}}
{{#vendorExtensions.x-field-extra-annotation}}
{{{.}}}
{{{vendorExtensions.x-field-extra-annotation}}}
{{/vendorExtensions.x-field-extra-annotation}}
private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};
{{/vars}}

View File

@@ -220,7 +220,7 @@ for this project used jakarta.validation-api -->
<swagger-core-version>1.5.22</swagger-core-version>
<jetty-version>9.2.9.v20150224</jetty-version>
<junit-version>4.13.2</junit-version>
<logback-version>1.5.19</logback-version>
<logback-version>1.5.13</logback-version>
{{#useBeanValidation}}
<beanvalidation-version>2.0.2</beanvalidation-version>
{{/useBeanValidation}}

View File

@@ -342,7 +342,7 @@ for this project used jakarta.validation-api -->
{{/generateSpringApplication}}
{{^generateSpringBootApplication}}
<junit-version>4.13.2</junit-version>
<logback-version>1.5.19</logback-version>
<logback-version>1.5.13</logback-version>
{{/generateSpringBootApplication}}
<cxf-version>3.5.9</cxf-version>
<jackson-jaxrs-version>2.17.1</jackson-jaxrs-version>

View File

@@ -56,7 +56,7 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#vendorExtensi
@Valid
{{/useBeanValidation}}{{/isFile}}{{/isString}}{{/isDateTime}}{{/isDate}}{{/isPrimitiveType}}
{{#vendorExtensions.x-field-extra-annotation}}
{{{.}}}
{{{vendorExtensions.x-field-extra-annotation}}}
{{/vendorExtensions.x-field-extra-annotation}}
{{#vendorExtensions.x-is-jackson-optional-nullable}}
{{#isContainer}}

View File

@@ -255,7 +255,7 @@ for this project used jakarta.validation-api -->
{{/swagger2AnnotationLibrary}}
<jetty-version>9.2.9.v20150224</jetty-version>
<junit-version>4.13.2</junit-version>
<logback-version>1.5.19</logback-version>
<logback-version>1.5.13</logback-version>
{{#useBeanValidation}}
<beanvalidation-version>2.0.2</beanvalidation-version>
{{/useBeanValidation}}

View File

@@ -311,7 +311,7 @@ for this project used jakarta.validation-api -->
{{/swagger2AnnotationLibrary}}
<jetty-version>9.2.9.v20150224</jetty-version>
<junit-version>4.13.2</junit-version>
<logback-version>1.5.19</logback-version>
<logback-version>1.5.13</logback-version>
{{#useBeanValidation}}
<beanvalidation-version>2.0.2</beanvalidation-version>
{{/useBeanValidation}}

View File

@@ -36,7 +36,7 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtens
@SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}})
{{/gson}}
{{#vendorExtensions.x-field-extra-annotation}}
{{{.}}}
{{{vendorExtensions.x-field-extra-annotation}}}
{{/vendorExtensions.x-field-extra-annotation}}
private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};

View File

@@ -222,7 +222,7 @@
<jersey3-version>3.1.3</jersey3-version>
<jackson-version>2.17.1</jackson-version>
<junit-version>4.13.2</junit-version>
<logback-version>1.5.19</logback-version>
<logback-version>1.5.13</logback-version>
<servlet-api-version>5.0.0</servlet-api-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

View File

@@ -36,7 +36,7 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtens
@SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}})
{{/gson}}
{{#vendorExtensions.x-field-extra-annotation}}
{{{.}}}
{{{vendorExtensions.x-field-extra-annotation}}}
{{/vendorExtensions.x-field-extra-annotation}}
private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};

View File

@@ -222,7 +222,7 @@ for this project used jakarta.validation-api -->
<jersey2-version>2.35</jersey2-version>
<jackson-version>2.17.1</jackson-version>
<junit-version>4.13.2</junit-version>
<logback-version>1.5.19</logback-version>
<logback-version>1.5.13</logback-version>
<servlet-api-version>4.0.4</servlet-api-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

View File

@@ -14,7 +14,7 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtens
{{>enumClass}}{{/mostInnerItems}}{{/isContainer}}{{/isEnum}}
{{#vendorExtensions.x-field-extra-annotation}}
{{{.}}}
{{{vendorExtensions.x-field-extra-annotation}}}
{{/vendorExtensions.x-field-extra-annotation}}
private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};{{/vars}}

View File

@@ -14,7 +14,7 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtens
{{>enumClass}}{{/mostInnerItems}}{{/isContainer}}{{/isEnum}}
{{#vendorExtensions.x-field-extra-annotation}}
{{{.}}}
{{{vendorExtensions.x-field-extra-annotation}}}
{{/vendorExtensions.x-field-extra-annotation}}
private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};{{/vars}}

View File

@@ -23,10 +23,7 @@ import {{javaxPackage}}.validation.Valid;{{/useBeanValidation}}
/**
* Represents a collection of functions to interact with the API endpoints.
*/
{{^interfaceOnly}}
@Path("{{commonPath}}")
{{/interfaceOnly}}
{{#useSwaggerAnnotations}}
@Path("{{commonPath}}"){{#useSwaggerAnnotations}}
@Api(description = "the {{{baseName}}} API"){{/useSwaggerAnnotations}}{{#hasConsumes}}
@Consumes({ {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }){{/hasConsumes}}{{#hasProduces}}
@Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }){{/hasProduces}}

View File

@@ -8,8 +8,8 @@
* @return {{{message}}}
{{/responses}}
*/
@{{httpMethod}}
@Path("{{commonPath}}{{{path}}}"){{#hasConsumes}}
@{{httpMethod}}{{#subresourceOperation}}
@Path("{{{path}}}"){{/subresourceOperation}}{{#hasConsumes}}
@Consumes({ {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }){{/hasConsumes}}{{#hasProduces}}
@Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }){{/hasProduces}}{{#useSwaggerAnnotations}}
@ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}"{{#hasAuthMethods}}, authorizations = {

Some files were not shown because too many files have changed in this diff Show More