java.lang.Object
com.predic8.membrane.core.openapi.serviceproxy.Rewrite

public class Rewrite extends Object
Description
  • Constructor Details

    • Rewrite

      public Rewrite()
  • Method Details

    • rewrite

      public com.fasterxml.jackson.databind.JsonNode rewrite(OpenAPIRecord rec, Exchange exc, URIFactory uriFactory) throws URISyntaxException
      Throws:
      URISyntaxException
    • rewriteUrl

      protected String rewriteUrl(Exchange exc, String url, URIFactory uriFactory) throws URISyntaxException
      Rewrites URL from OpenAPI 3.X
      Parameters:
      exc - Exchange
      url - URL to rewrite
      uriFactory - URIFactory
      Returns:
      Rewritten URL
      Throws:
      URISyntaxException - syntax error ín URL
    • getRewrittenHostAndPortSwagger2

      protected String getRewrittenHostAndPortSwagger2(Exchange exc)
      Rewrites Host from Swagger 2.X
      Parameters:
      exc - Exchange
      Returns:
      Rewritten host with port
    • rewriteProtocol

      public String rewriteProtocol(String protocol)
      Rewrites the protocol if there was a value given.
      Parameters:
      protocol - from the OpenAPI
      Returns:
      rewritten value
    • rewriteHost

      public String rewriteHost(String host)
      Rewrites the host if there was a value given.
      Parameters:
      host - from the OpenAPI
      Returns:
      rewritten value
    • rewriteUrl

      public String rewriteUrl(String url)
    • rewritePort

      public String rewritePort(String port)
      Rewrites the port if there was a value given.
      Parameters:
      port - from the OpenAPI
      Returns:
      rewritten value
    • getPort

      public Integer getPort()
    • setPort

      public void setPort(int port)
    • getProtocol

      public String getProtocol()
    • setProtocol

      public void setProtocol(String protocol)
    • getHost

      public String getHost()
    • setHost

      public void setHost(String host)
    • setBasePath

      public void setBasePath(String basePath)
    • getBasePath

      public String getBasePath()