Skip to content

Commit 40376ee

Browse files
committed
fix: adapt to json-schema-ref-parser new dereference strategy
1 parent 29c6949 commit 40376ee

File tree

4 files changed

+17
-2
lines changed

4 files changed

+17
-2
lines changed

plugins/asyncapi-jsonschema2pojo/src/test/resources/asyncapi.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ components:
2525
description: something else
2626
$ref: "#/components/schemas/Email"
2727
department:
28-
description: department where user works
2928
$ref: "#/components/schemas/Department-v1"
3029
schemas:
3130
Email:

plugins/avro-schema-compiler/pom.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@
2121
<artifactId>avro-compiler</artifactId>
2222
<version>${avro-compiler.version}</version>
2323
<scope>optional</scope>
24+
<exclusions>
25+
<exclusion>
26+
<groupId>com.fasterxml.jackson.core</groupId>
27+
<artifactId>jackson-core</artifactId>
28+
</exclusion>
29+
<exclusion>
30+
<groupId>com.fasterxml.jackson.core</groupId>
31+
<artifactId>jackson-databind</artifactId>
32+
</exclusion>
33+
</exclusions>
2434
</dependency>
2535
</dependencies>
2636
</project>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<reflections.version>0.10.2</reflections.version>
5757
<handlebars-java.version>4.3.1</handlebars-java.version>
5858
<json-path.version>2.9.0</json-path.version>
59-
<json-schema-ref-parser-jvm.version>0.9.4</json-schema-ref-parser-jvm.version>
59+
<json-schema-ref-parser-jvm.version>0.9.5</json-schema-ref-parser-jvm.version>
6060
<zdl-jvm.version>1.3.0</zdl-jvm.version>
6161
<graphql-java.version>19.2</graphql-java.version>
6262
<google-java-format.version>1.25.2</google-java-format.version>

zenwave-sdk-cli/src/main/java/io/zenwave360/sdk/processors/AsyncApiProcessor.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ public Map<String, Object> process(Map<String, Object> contextModel) {
9393
}
9494
});
9595

96+
apiModel.getRefs().getReplacedRefsList().forEach(pair -> {
97+
if (pair.getValue() instanceof Map) {
98+
((Map) pair.getValue()).put("x--original-$ref", pair.getKey().getRef());
99+
}
100+
});
101+
96102
List<Map<String, Map>> traitsParents = JSONPath.get(apiModel, "$..[?(@.traits)]");
97103
for (Map<String, Map> traitParent : traitsParents) {
98104
List<Map<String, Map>> traitsList = (List) traitParent.get("traits");

0 commit comments

Comments
 (0)