Skip to content

Changes: #591

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ private ObjectNode getPathsNode( final Aspect aspect, final OpenApiSchemaGenerat
includeQueryPathNode.set( FIELD_POST,
merge( getRequestEndpointFilter( aspect, propertiesNode, config.baseUrl(), apiVersion, config.resourcePath() ),
queriesTemplate, FIELD_POST ) );
endpointPathsNode.set( config.baseUrl() + String.format( QUERY_SERVER_PATH, apiVersion ) + finalResourcePath,
endpointPathsNode.set( String.format( QUERY_SERVER_PATH, apiVersion ) + finalResourcePath,
includeQueryPathNode );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ void testIncludeQueryApiWithSemanticVersion( final KnownVersion metaModelVersion
final JsonNode json = apiJsonGenerator.apply( aspect, config ).getContent();
final SwaggerParseResult result = new OpenAPIParser().readContents( json.toString(), null, null );
final OpenAPI openApi = result.getOpenAPI();
assertThat( openApi.getPaths().get( "https://test-aspect.example.com/query-api/v1.0.0/" + TEST_RESOURCE_PATH ).getPost().getServers()
assertThat( openApi.getPaths().get( "/query-api/v1.0.0/" + TEST_RESOURCE_PATH ).getPost().getServers()
.get( 0 ).getUrl() )
.isEqualTo( "https://test-aspect.example.com/query-api/v1.0.0" );
}
Expand All @@ -193,7 +193,7 @@ void testDefaultResourcePath( final KnownVersion metaModelVersion ) {
assertThat( openApi.getPaths().get( apiEndpoint ).getPatch() ).isNull();
assertThat( openApi.getPaths().keySet() ).anyMatch( path -> path.equals( apiEndpoint ) );
assertThat( openApi.getPaths().keySet() ).anyMatch(
path -> path.equals( "https://test-aspect.example.com/query-api/v1.0.0" + apiEndpoint ) );
path -> path.equals( "/query-api/v1.0.0" + apiEndpoint ) );
}

@ParameterizedTest
Expand Down Expand Up @@ -226,7 +226,7 @@ void testWithValidResourcePath( final KnownVersion metaModelVersion ) {

assertThat( openApi.getPaths().keySet() ).anyMatch( path -> path.equals( "/" + TEST_RESOURCE_PATH ) );
assertThat( openApi.getPaths().keySet() ).anyMatch(
path -> path.equals( "https://test-aspect.example.com/query-api/v1.0.0/" + TEST_RESOURCE_PATH ) );
path -> path.equals( "/query-api/v1.0.0/" + TEST_RESOURCE_PATH ) );
}

@ParameterizedTest
Expand Down Expand Up @@ -549,7 +549,7 @@ void testAspectWithAllCrud( final KnownVersion metaModelVersion ) {
assertThat( openApi.getPaths().get( apiEndpoint ).getPut() ).isNotNull();
assertThat( openApi.getPaths().get( apiEndpoint ).getPatch() ).isNotNull();
assertThat( openApi.getPaths().keySet() ).anyMatch(
path -> path.equals( "https://test-aspect.example.com/query-api/v1.0.0" + apiEndpoint ) );
path -> path.equals( "/query-api/v1.0.0" + apiEndpoint ) );
}

@ParameterizedTest
Expand All @@ -573,7 +573,7 @@ void testAspectWithPostOperation( final KnownVersion metaModelVersion ) {
assertThat( openApi.getPaths().get( apiEndpoint ).getPut() ).isNull();
assertThat( openApi.getPaths().get( apiEndpoint ).getPatch() ).isNull();
assertThat( openApi.getPaths().keySet() ).anyMatch(
path -> path.equals( "https://test-aspect.example.com/query-api/v1.0.0" + apiEndpoint ) );
path -> path.equals( "/query-api/v1.0.0" + apiEndpoint ) );
}

@ParameterizedTest
Expand All @@ -597,7 +597,7 @@ void testAspectWithPutOperation( final KnownVersion metaModelVersion ) {
assertThat( openApi.getPaths().get( apiEndpoint ).getPut() ).isNotNull();
assertThat( openApi.getPaths().get( apiEndpoint ).getPatch() ).isNull();
assertThat( openApi.getPaths().keySet() ).anyMatch(
path -> path.equals( "https://test-aspect.example.com/query-api/v1.0.0" + apiEndpoint ) );
path -> path.equals( "/query-api/v1.0.0" + apiEndpoint ) );
}

@ParameterizedTest
Expand All @@ -621,7 +621,7 @@ void testAspectWithPatchOperation( final KnownVersion metaModelVersion ) {
assertThat( openApi.getPaths().get( apiEndpoint ).getPut() ).isNull();
assertThat( openApi.getPaths().get( apiEndpoint ).getPatch() ).isNotNull();
assertThat( openApi.getPaths().keySet() ).anyMatch(
path -> path.equals( "https://test-aspect.example.com/query-api/v1.0.0" + apiEndpoint ) );
path -> path.equals( "/query-api/v1.0.0" + apiEndpoint ) );
}

@ParameterizedTest
Expand All @@ -646,7 +646,7 @@ void testAspectWithPatchAndPostOperation( final KnownVersion metaModelVersion )
assertThat( openApi.getPaths().get( apiEndpoint ).getPut() ).isNull();
assertThat( openApi.getPaths().get( apiEndpoint ).getPatch() ).isNotNull();
assertThat( openApi.getPaths().keySet() ).anyMatch(
path -> path.equals( "https://test-aspect.example.com/query-api/v1.0.0" + apiEndpoint ) );
path -> path.equals( "/query-api/v1.0.0" + apiEndpoint ) );
}

@ParameterizedTest
Expand Down
Loading