Interface JsonSchemaClassPathResourceLoader


public interface JsonSchemaClassPathResourceLoader
API to retrieve a JSON Schema for a class.
Since:
1.7.0
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> @Nullable Optional<String>
    jsonSchemaStringForClass(@NonNull Class<T> type)
    This method retrieves the JSON Schema for a class for which a JSON Schema was generated.
  • Method Details

    • jsonSchemaStringForClass

      @Nullable <T> @Nullable Optional<String> jsonSchemaStringForClass(@NonNull @NonNull Class<T> type)
      This method retrieves the JSON Schema for a class for which a JSON Schema was generated. Micronaut JSON Schema annotation processor generates a JSON Schema at compilation-time for classes annotated with JsonSchema. The generated JSON Schema, by default, is saved to META/schemas.
      Type Parameters:
      T - Type used to generate the JSON Schema
      Parameters:
      type - the class for which a JSON Schema was generated at compilation-time.
      Returns:
      A JSON Schema