Skip to content

Commit b2b785b

Browse files
authored
#71 solved null pointer exception (#72)
* #71 solved null pointer exception * #71 fixed test refs * #71 changed greetings yml * #71 changed greetings workflow
1 parent c05b018 commit b2b785b

File tree

6 files changed

+7
-3
lines changed

6 files changed

+7
-3
lines changed

.github/workflows/greetings.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/first-interaction@v1
10+
continue-on-error: true
1011
with:
1112
repo-token: ${{ secrets.GITHUB_TOKEN }}
1213
issue-message: "Thank you for collaborating with the project by giving us feedback!!"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ After you have these installed, you need to add the Spring Cloud Contract Maven
3535
<dependency>
3636
<groupId>net.coru</groupId>
3737
<artifactId>scc-multiapi-converter</artifactId>
38-
<version>2.7.1</version>
38+
<version>3.0.1</version>
3939
<scope>compile</scope>
4040
</dependency>
4141
</dependencies>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>net.coru</groupId>
88
<artifactId>scc-multiapi-converter</artifactId>
9-
<version>3.0.0</version>
9+
<version>3.0.1</version>
1010
<name>SCC-MultiApi-Converter</name>
1111
<description>Generates Spring Cloud Contracts based on an OpenApi and AsyncApi document</description>
1212
<url>https://github.com/corunet/scc-multiapi-converter</url>

src/main/java/net/coru/multiapi/converter/openapi/OpenApiContractConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ private Pair<Object, BodyMatchers> processComplexBodyAndMatchers(final String ob
668668
} else {
669669
final String type;
670670
type = getPropertyType(property);
671-
final var prop = writeBodyMatcher(property, newObjectName, null, type);
671+
final var prop = writeBodyMatcher(property, newObjectName, property.getValue(), type);
672672
propertyMap.put(property.getKey(), prop.getLeft());
673673
bodyMatchers.matchers().addAll(prop.getRight().matchers());
674674
}

src/test/java/net/coru/multiapi/converter/openapi/OpenApiContractConverterTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ void testRef() {
205205
assertThat(contract).isNotNull();
206206
assertThat(contract.getRequest()).isNotNull();
207207
assertThat(contract.getResponse()).isNotNull();
208+
assertThat(contract.getResponse().getBodyMatchers()).isNotNull();
208209
Map<String, Object> bodyServerValueMap = (Map<String, Object>) contract.getResponse().getBody().getServerValue();
209210
assertThat(bodyServerValueMap)
210211
.containsKey("player");

src/test/java/net/coru/multiapi/converter/openapi/OpenApiContractConverterTestFixtures.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ public final class OpenApiContractConverterTestFixtures {
8282

8383
static final String OPENAPI_TEST_SCHEMA_EXAMPLES_YML = "src/test/resources/openapi/testExamplesGlobal.yml";
8484

85+
static final String OPENAPI_TEST_GENERATE_TESTS_YML = "src/test/resourcer/openapi/testGenerateTest.yml";
86+
8587
static final String OPENAPI_TEST_SCHEMA_MULTI_EXAMPLES_YML = "src/test/resources/openapi/testMultiExamplesGlobal.yml";
8688

8789
static final String OPENAPI_TEST_SCHEMA_MAPS_YML = "src/test/resources/openapi/testSupportMaps.yml";

0 commit comments

Comments
 (0)