Class OpenAPIConverter

java.lang.Object
org.mockserver.openapi.OpenAPIConverter

public class OpenAPIConverter extends Object
  • Constructor Details

  • Method Details

    • buildExpectations

      public List<Expectation> buildExpectations(String specUrlOrPayload, Map<String,Object> operationsAndResponses)
    • buildExpectations

      public List<Expectation> buildExpectations(String specUrlOrPayload, Map<String,Object> operationsAndResponses, String contextPathPrefix)
    • isJsonContentType

      public static boolean isJsonContentType(String contentType)
    • isXmlContentType

      public static boolean isXmlContentType(String contentType)
      True when the content type denotes XML — application/xml, text/xml, or any media type with a +xml structured-syntax suffix (e.g. application/atom+xml). Used to route a generated example through XmlExampleSerializer so an XML response yields a real XML body rather than a JSON-shaped string.