File tree Expand file tree Collapse file tree
src/test/java/nl/rijksoverheid/moz/controller Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55import com .atlassian .oai .validator .report .ValidationReport ;
66import com .atlassian .oai .validator .restassured .OpenApiValidationFilter ;
77import io .restassured .RestAssured ;
8+ import org .eclipse .microprofile .config .ConfigProvider ;
89import org .junit .jupiter .api .BeforeEach ;
910
1011import java .net .HttpURLConnection ;
@@ -35,7 +36,10 @@ abstract class OpenApiValidationTest {
3536 @ BeforeEach
3637 void setupValidationFilter () throws Exception {
3738 if (validationFilter != null ) return ;
38- URL url = new URL ("http://localhost:" + RestAssured .port + "/q/openapi" );
39+ String openApiPath = ConfigProvider .getConfig ()
40+ .getOptionalValue ("quarkus.smallrye-openapi.path" , String .class )
41+ .orElse ("/q/openapi" );
42+ URL url = new URL ("http://localhost:" + RestAssured .port + openApiPath );
3943 HttpURLConnection conn = (HttpURLConnection ) url .openConnection (Proxy .NO_PROXY );
4044 conn .setRequestProperty ("Accept" , "application/json" );
4145 String specJson = new String (conn .getInputStream ().readAllBytes (), StandardCharsets .UTF_8 );
You can’t perform that action at this time.
0 commit comments