Class JsonSchemaResourceUtils
java.lang.Object
io.micronaut.jsonschema.utils.JsonSchemaResourceUtils
Internal utilities for resolving JSON schema resources on the classpath.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull Stringstatic @NonNull StringgeneratedSchemasFolder(@NonNull JsonSchemaConfiguration jsonSchemaConfiguration) static @NonNull StringresolvePathWithinFolder(@NonNull String schemaFolder, @NonNull String relativePath, @NonNull String uriForError, @NonNull String configuredFolderForError) Resolve and normalize a relative schema path within the given folder.
-
Field Details
-
CLASSPATH_PREFIX
- See Also:
-
META_INF
- See Also:
-
SLASH
- See Also:
-
-
Method Details
-
generatedSchemasFolder
public static @NonNull String generatedSchemasFolder(@NonNull JsonSchemaConfiguration jsonSchemaConfiguration) - Parameters:
jsonSchemaConfiguration- The JSON schema configuration- Returns:
META-INF/<outputLocation>/
-
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 pathuriForError- The URI (string form) used for error messagesconfiguredFolderForError- The configured folder (string form) used for error messages- Returns:
- The normalized file path
-