Class JsonSchemaResourceUtils

java.lang.Object
io.micronaut.jsonschema.utils.JsonSchemaResourceUtils

@Internal public final class JsonSchemaResourceUtils extends Object
Internal utilities for resolving JSON schema resources on the classpath.
  • Field Details

  • Method Details

    • generatedSchemasFolder

      public static @NonNull String generatedSchemasFolder(@NonNull JsonSchemaConfiguration jsonSchemaConfiguration)
      Parameters:
      jsonSchemaConfiguration - The JSON schema configuration
      Returns:
      META-INF/<outputLocation>/
    • configurationSchemasFolder

      public static @NonNull String configurationSchemasFolder()
      Returns:
      META-INF/micronaut-configuration-schemas/
    • resolvePathWithinFolder

      public static @NonNull String resolvePathWithinFolder(@NonNull String schemaFolder, @NonNull String relativePath, @NonNull String uriForError, @NonNull String configuredFolderForError)
      Resolve and normalize a relative schema path within the given folder.
      Parameters:
      schemaFolder - The schema folder (must end with a slash)
      relativePath - The relative path
      uriForError - The URI (string form) used for error messages
      configuredFolderForError - The configured folder (string form) used for error messages
      Returns:
      The normalized file path