Skip to content

Commit

Permalink
Merge branch 'swagger-api:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Fyro-Ing authored Jan 3, 2024
2 parents 879026a + 4fee228 commit a6c07f3
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4409,6 +4409,14 @@ protected void setParameterNullable(CodegenParameter parameter, CodegenProperty
parameter.nullable = property.nullable;
}

protected void setParameterJson(CodegenParameter codegenParameter, Schema parameterSchema) {
String contentType = parameterSchema.getExtensions() == null ? null : (String) parameterSchema.getExtensions().get("x-content-type");
if (contentType != null && contentType.startsWith("application/") && contentType.endsWith("json")) {
// application/json, application/problem+json, application/ld+json, some more?
codegenParameter.isJson = true;
}
}

protected boolean isFileTypeSchema(Schema schema) {
final Schema fileTypeSchema;
if (StringUtils.isNotBlank(schema.get$ref())) {
Expand Down

0 comments on commit a6c07f3

Please sign in to comment.