Class ObjectMapperProvider


  • public class ObjectMapperProvider
    extends io.swagger.v3.core.util.ObjectMapperFactory
    The type Spring doc object mapper provider.
    • Constructor Detail

      • ObjectMapperProvider

        public ObjectMapperProvider​(SpringDocConfigProperties springDocConfigProperties)
        Instantiates a new Spring doc object mapper.
        Parameters:
        springDocConfigProperties - the spring doc config properties
    • Method Detail

      • jsonMapper

        public com.fasterxml.jackson.databind.ObjectMapper jsonMapper()
        Mapper object mapper.
        Returns:
        the object mapper
      • yamlMapper

        public com.fasterxml.jackson.databind.ObjectMapper yamlMapper()
        Yaml mapper object mapper.
        Returns:
        the object mapper
      • createJson

        public static com.fasterxml.jackson.databind.ObjectMapper createJson​(SpringDocConfigProperties springDocConfigProperties)
        Create json object mapper.
        Parameters:
        springDocConfigProperties - the spring doc config properties
        Returns:
        the object mapper
      • sortOutput

        public static void sortOutput​(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
                                      SpringDocConfigProperties springDocConfigProperties)
        Sort output.
        Parameters:
        objectMapper - the object mapper