Interface MediaTypeRegistration


public interface MediaTypeRegistration
A MediaTypeRegistration is used to register mediatypes to the openapi mediatype registry. It consists of a predicate that checks if a media type can be handled by the created content analysers.
  • Field Details

  • Method Details

    • createContentAnalyser

      ContentAnalyser createContentAnalyser(String contentType, Buffer content, ValidationContext context)
      Creates a new ContentAnalyser. This is required, because ContentAnalyser could be stateful.
      Parameters:
      contentType - The raw content type from the http headers.
      content - The content of the request or response.
      context - Whether the analyser is for a request or response.
      Returns:
      A fresh content analyser instance.
    • canHandle

      boolean canHandle(String mediaType)
      Checks if this registration can handle the given media type. This method is intended to be used by the MediaTypeRegistry.
      Parameters:
      mediaType - The media type to check
      Returns:
      true if the mediatype can be handled, false otherwise
    • supportedTypes

      List<String> supportedTypes()
      This method is intended for reporting of supported media types in the system.
      Returns:
      The list of supported types.