ContributionsMost RecentMost LikesSolutionsRe: Render Html pages coming as response of get API You can use libraries like fetch or axios to make the HTTP request. for more detail check this doc Re: Is there a way to add multiple existence assertions Here's an ex: how you can add multiple existence assertions in JavaScript or a tool-specific scripting.. // Sample response JSON var response = { "_master_meta": {}, "_slave_meta": {}, "master": {}, "slave": {} }; // Define an array of nodes to check for existence var nodesToCheck = ["_master_meta", "_slave_meta", "master", "slave"]; // Create a function to check the existence of nodes function checkNodeExistence(nodeName) { if (response.hasOwnProperty(nodeName)) { // Node exists return true; } else { // Node does not exist return false; } } // Loop through the nodes and add assertions for (var i = 0; i < nodesToCheck.length; i++) { var nodeName = nodesToCheck[i]; var isNodeExist = checkNodeExistence(nodeName); // Add assertions based on the result if (isNodeExist) { // Add a pass assertion for node existence // You can add this result to your test report console.log(nodeName + " exists: PASS"); } else { // Add a fail assertion for node non-existence // You can handle this failure in your testing process console.error(nodeName + " does not exist: FAIL"); } } I hope it helps. Re: How to configure Swagger UI's URL with Apache CXF? Update your MyApp class to include the Swagger UI configuration. import org.apache.cxf.jaxrs.openapi.OpenApiFeature; import org.apache.cxf.jaxrs.swagger.ui.SwaggerUiConfig; public class MyApp extends Application { // ... @Override public Set<Object> getSingletons() { final OpenApiFeature feature = new OpenApiFeature(); // Set the Swagger UI configuration SwaggerUiConfig uiConfig = new SwaggerUiConfig() .url("/webappname/doc/openapi.json") // Set the URL of your swagger.json file .queryConfigEnabled(true); feature.setSwaggerUiConfig(uiConfig); singletons.add(feature); return singletons; } } In your web.xml, update the servlet and servlet-mapping to map the URL of your Swagger UI. <servlet> <display-name>REST API Documentation</display-name> <servlet-name>RestAPIDoc</servlet-name> <servlet-class>org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet</servlet-class> <init-param> <param-name>jaxrs.serviceClasses</param-name> <param-value>com.abc.xyz.AgentManagerService</param-value> </init-param> <init-param> <param-name>jaxrs.features</param-name> <param-value>org.apache.cxf.jaxrs.openapi.OpenApiFeature</param-value> </init-param> <init-param> <param-name>jaxrs.providers</param-name> <param-value> org.apache.cxf.jaxrs.provider.MultipartProvider, com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider </param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>RestAPIDoc</servlet-name> <url-pattern>/doc/*</url-pattern> </servlet-mapping> Make sure your swagger.json file is available at the specified URL (/webappname/doc/openapi.json) and contains the correct API definition for your application. I hope it helps. Re: Dynamic/Variable servers URLs in the swagger document You can use a combination of environment variables and server-side code to generate the swagger.json file dynamically during deployment. This way, the server URLs will be automatically set based on the environment where the application is deployed Here are the steps..... Set up environment variables for each of your server URLs. During the build or deployment process, use server-side code or a build script to generate the swagger.json file dynamically. In your case, since you're using Vue CLI, you can use a build script to perform this task. Within the build script, read the environment variables you defined in Step 1 and inject them into the swagger.json file. Replace the placeholders for server URL and server name with the actual values from the environment variables. Once the swagger.json file is generated with the correct server URLs, serve it to your Swagger UI or Swagger Express middleware. Here's an example of how i did with Node.js and Vue CLI 1. Create a swagger-config.js file in the root of your project. javascript const fs = require('fs'); const { serverUrl, serverName } = process.env; const swaggerJson = { openapi: '3.0.0', // ... other parts of your swagger.json ... servers: [ { url: serverUrl, description: serverName, }, ], // ... other parts of your swagger.json ... }; fs.writeFileSync('dist/swagger.json', JSON.stringify(swaggerJson)); 2. In your package.json, update the build script to execute the swagger-config.js before the build: json { "scripts": { "build": "node swagger-config.js && vue-cli-service build" } } Before deploying your application, set the environment variables for each environment ex... production, staging, dev.. Now Run the build command to generate the dynamic swagger.json: bash npm run build Deploy the contents of the `dist` folder, which should now include the dynamic swagger.json with the correct server URLs. Hopefully, your Swagger document will automatically have the correct server URLs based on the environment where it is deployed,