Skip to content

Commit

Permalink
#71 solved null pointer exception (#72)
Browse files Browse the repository at this point in the history
* #71 solved null pointer exception

* #71 fixed test refs

* #71 changed greetings yml

* #71 changed greetings workflow
  • Loading branch information
IsaUlloa authored Oct 6, 2022
1 parent c05b018 commit b2b785b
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
continue-on-error: true
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: "Thank you for collaborating with the project by giving us feedback!!"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ After you have these installed, you need to add the Spring Cloud Contract Maven
<dependency>
<groupId>net.coru</groupId>
<artifactId>scc-multiapi-converter</artifactId>
<version>2.7.1</version>
<version>3.0.1</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>net.coru</groupId>
<artifactId>scc-multiapi-converter</artifactId>
<version>3.0.0</version>
<version>3.0.1</version>
<name>SCC-MultiApi-Converter</name>
<description>Generates Spring Cloud Contracts based on an OpenApi and AsyncApi document</description>
<url>https://github.com/corunet/scc-multiapi-converter</url>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ private Pair<Object, BodyMatchers> processComplexBodyAndMatchers(final String ob
} else {
final String type;
type = getPropertyType(property);
final var prop = writeBodyMatcher(property, newObjectName, null, type);
final var prop = writeBodyMatcher(property, newObjectName, property.getValue(), type);
propertyMap.put(property.getKey(), prop.getLeft());
bodyMatchers.matchers().addAll(prop.getRight().matchers());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ void testRef() {
assertThat(contract).isNotNull();
assertThat(contract.getRequest()).isNotNull();
assertThat(contract.getResponse()).isNotNull();
assertThat(contract.getResponse().getBodyMatchers()).isNotNull();
Map<String, Object> bodyServerValueMap = (Map<String, Object>) contract.getResponse().getBody().getServerValue();
assertThat(bodyServerValueMap)
.containsKey("player");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ public final class OpenApiContractConverterTestFixtures {

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

static final String OPENAPI_TEST_GENERATE_TESTS_YML = "src/test/resourcer/openapi/testGenerateTest.yml";

static final String OPENAPI_TEST_SCHEMA_MULTI_EXAMPLES_YML = "src/test/resources/openapi/testMultiExamplesGlobal.yml";

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

0 comments on commit b2b785b

Please sign in to comment.