Class OpenApiMapperProviders

java.lang.Object
io.micronaut.openapi.mapper.OpenApiMapperProviders

public final class OpenApiMapperProviders extends Object
Locates the OpenApiMapperProvider to use.
Since:
8.0.0
  • Field Details

    • MAPPER_PROPERTY

      public static final String MAPPER_PROPERTY
      The property that selects the provider by name when more than one is available.
      See Also:
    • DEFAULT_PROVIDER

      public static final String DEFAULT_PROVIDER
      The name of the provider chosen when several are available and none is selected.
      See Also:
  • Method Details

    • findAll

      public static List<OpenApiMapperProvider> findAll(ClassLoader classLoader)
      Finds all available providers, ordered by name.
      Parameters:
      classLoader - The class loader to search
      Returns:
      The providers
    • select

      public static OpenApiMapperProvider select(@Nullable @Nullable String name, ClassLoader classLoader)
      Selects a provider.
      • If name is set, the provider with that name is used.
      • Otherwise, if exactly one provider is available it is used.
      • Otherwise, the "jackson" provider is used if available.
      Parameters:
      name - The requested provider name, or null
      classLoader - The class loader to search
      Returns:
      The provider
      Throws:
      IllegalStateException - if no suitable provider is available