diff --git a/src/main/java/com/twilio/oai/TwilioCodegenAdapter.java b/src/main/java/com/twilio/oai/TwilioCodegenAdapter.java index bdfd9732e..be96d25c2 100644 --- a/src/main/java/com/twilio/oai/TwilioCodegenAdapter.java +++ b/src/main/java/com/twilio/oai/TwilioCodegenAdapter.java @@ -105,6 +105,7 @@ public String getDomainFromOpenAPI(final OpenAPI openAPI) { if (url.isPresent() && !url.get().equals(DEFAULT_URL)){ domain = url.get().replaceAll(SERVER_PATTERN, "${domain}"); setDomain(domain); + return domain; } } //fetch domain from server url present in openAPI.paths diff --git a/src/test/java/com/twilio/oai/TwilioGeneratorTest.java b/src/test/java/com/twilio/oai/TwilioGeneratorTest.java index 00d84bd3e..797c096e2 100644 --- a/src/test/java/com/twilio/oai/TwilioGeneratorTest.java +++ b/src/test/java/com/twilio/oai/TwilioGeneratorTest.java @@ -40,7 +40,7 @@ public static void setUp() { @Test public void launchGenerator() { - final String pathname = "/Users/sbansla/Documents/code/twilio-oai/spec/yaml/twilio_lookups_bulk.yaml"; + final String pathname = "/Users/sbansla/Documents/code/twilio-oai/spec/yaml/twilio_content_sdk.yaml"; //final String pathname = "examples/spec/twilio_flex_v1.yaml"; //final String pathname = "examples/spec/twilio_versionless.yaml"; //final String pathname = "/Users/sbansla/Documents/code/twilio-oai/spec/yaml/twilio_content_app.yaml";