Skip to content

Commit

Permalink
[plugins/asyncapi-spring-cloud-streams3] adds support for `modelNameP…
Browse files Browse the repository at this point in the history
…refix` and `modelNameSuffix`
  • Loading branch information
ivangsa committed Sep 1, 2024
1 parent 5dfb6ab commit e6bf3e4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,9 @@ public void calculateMessageParamType(Map<String, Object> apiModel, Map<String,
if ("asyncapi".equals(schemaFormat) || "openapi".equals(schemaFormat)) {
javaType = normalizeTagName(JSONPath.getFirst(message, "$.payload.schema.x--schema-name", "$.payload.x--schema-name"));
if (javaType == null) {
javaType = modelNamePrefix + normalizeTagName((String) message.getOrDefault("x-javaType", message.getOrDefault("messageId", message.get("name")))) + modelNameSuffix;
javaType = normalizeTagName((String) message.getOrDefault("x-javaType", message.getOrDefault("messageId", message.get("name"))));
}
javaType = modelNamePrefix + javaType + modelNameSuffix;
}

if (javaType != null) {
Expand Down

0 comments on commit e6bf3e4

Please sign in to comment.