Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -391,6 +391,10 @@ protected void useCodegenAsMustacheParentContext() {

@Override
public void processOpts() {
// add open brace {{openbrace}} and close brace {{closebrace}} to additionalProperties for all mustache templates
// to use when needed to use them where mustache would prevent plaintext
additionalProperties.put("openbrace", "{");
Comment thread
cubic-dev-ai[bot] marked this conversation as resolved.
Outdated
additionalProperties.put("closebrace", "}");
Comment thread
cubic-dev-ai[bot] marked this conversation as resolved.
Outdated

if (!additionalProperties.containsKey(CodegenConstants.MUSTACHE_PARENT_CONTEXT)) {
// by default empty parent context
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,6 @@ public JavaMicronautAbstractCodegen() {
))
);

// Set additional properties
additionalProperties.put("openbrace", "{");
additionalProperties.put("closebrace", "}");

// Set client options that will be presented to user
updateOption(INVOKER_PACKAGE, this.getInvokerPackage());
updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
"ApiResponse"
));

public static final String OPEN_BRACE = "{";
public static final String CLOSE_BRACE = "}";

public static final String TITLE = "title";
public static final String SERVER_PORT = "serverPort";
public static final String CONFIG_PACKAGE = "configPackage";
Expand Down Expand Up @@ -222,9 +219,6 @@ public KotlinSpringServerCodegen() {
// cliOptions default redefinition need to be updated
updateOption(CodegenConstants.ARTIFACT_ID, this.artifactId);

additionalProperties.put("openbrace", OPEN_BRACE);
additionalProperties.put("closebrace", CLOSE_BRACE);

// Use lists instead of arrays
typeMapping.put("array", "kotlin.collections.List");
typeMapping.put("list", "kotlin.collections.List");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,6 @@ public enum RequestMappingMode {
}
}

public static final String OPEN_BRACE = "{";
public static final String CLOSE_BRACE = "}";

@Setter protected String title = "OpenAPI Spring";
@Getter @Setter
protected String configPackage = "org.openapitools.configuration";
Expand Down Expand Up @@ -222,8 +219,6 @@ public SpringCodegen() {

// spring uses the jackson lib
jackson = true;
additionalProperties.put("openbrace", OPEN_BRACE);
additionalProperties.put("closebrace", CLOSE_BRACE);

cliOptions.add(new CliOption(TITLE, "server title name or client service name").defaultValue(title));
cliOptions.add(new CliOption(CONFIG_PACKAGE, "configuration package for generated code")
Expand Down
Loading