Skip to content

Commit 4408b95

Browse files
committed
Set remaining vendor extensions to convention of lower kebab-cased with x- prefix
1 parent dc7eef7 commit 4408b95

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public class OCamlClientCodegen extends DefaultCodegen implements CodegenConfig
4545
public static final String PACKAGE_NAME = "packageName";
4646
public static final String PACKAGE_VERSION = "packageVersion";
4747

48-
static final String X_MODEL_MODULE = "x-modelModule";
48+
static final String X_MODEL_MODULE = "x-model-module";
4949

5050
public static final String CO_HTTP = "cohttp";
5151

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
public class PhpZendExpressivePathHandlerServerCodegen extends AbstractPhpCodegen {
3737
private static final Logger LOGGER = LoggerFactory.getLogger(PhpZendExpressivePathHandlerServerCodegen.class);
3838

39+
// TODO: Rename to x- prefixed vendor extensions, per specification.
3940
public static final String VEN_FROM_QUERY = "internal.ze-ph.fromQuery";
4041
public static final String VEN_COLLECTION_FORMAT = "internal.ze-ph.collectionFormat";
4142
public static final String VEN_QUERY_DATA_TYPE = "internal.ze-ph.queryDataType";

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ public CodegenOperation fromOperation(String path, String httpMethod, Operation
702702
hasPathParams = true;
703703
}
704704

705-
op.vendorExtensions.put("callbackParams", params);
705+
op.vendorExtensions.put("x-callback-params", params);
706706
}
707707

708708
// Save off the regular expression and path details in the relevant
@@ -991,7 +991,7 @@ private void postProcessOperationWithModels(CodegenOperation op, List<Object> al
991991
additionalProperties.put("apiUsesMultipartFormData", true);
992992
additionalProperties.put("apiUsesMultipart", true);
993993
} else if (isMimetypeMultipartRelated(mediaType)) {
994-
op.vendorExtensions.put("consumesMultipartRelated", true);
994+
op.vendorExtensions.put("x-consumes-multipart-related", true);
995995
additionalProperties.put("apiUsesMultipartRelated", true);
996996
additionalProperties.put("apiUsesMultipart", true);
997997
}
@@ -1574,9 +1574,10 @@ private void processParam(CodegenParameter param, CodegenOperation op) {
15741574
}
15751575

15761576
if (Boolean.TRUE.equals(param.isFreeFormObject)) {
1577-
param.vendorExtensions.put("formatString", "{:?}");
1577+
param.vendorExtensions.put("x-format-string", "{:?}");
15781578
example = null;
15791579
} else if (param.isString) {
1580+
param.vendorExtensions.put("x-format-string", "\\\"{}\\\"");
15801581
example = "\"" + ((param.example != null) ? param.example : "") + "\".to_string()";
15811582
} else if (param.isPrimitiveType) {
15821583
if ((param.isByteArray) || (param.isBinary)) {

0 commit comments

Comments
 (0)