Annotation Type JsonSchemaInject


  • @Target({METHOD,FIELD,PARAMETER,TYPE})
    @Retention(RUNTIME)
    public @interface JsonSchemaInject
    Use this annotation to inject JSON into the generated jsonSchema. When applied to a class, will be injected into the object type node. When applied to a property, will be injected into the property node.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      JsonSchemaBool[] bools
      Collection of Boolean key/value pairs that will be injected.
      JsonSchemaInt[] ints
      Collection of Integer key/value pairs that will be injected.
      java.lang.Class<?>[] javaxValidationGroups  
      java.lang.String json
      JSON that will injected into the object or property node.
      java.lang.Class<? extends java.util.function.Supplier<com.fasterxml.jackson.databind.JsonNode>> jsonSupplier
      Supplier of a JsonNode that will be injected.
      java.lang.String jsonSupplierViaLookup
      Key to entry in JsonSchemaConfig.jsonSuppliers which will supply a JsonNode that will be injected.
      boolean overrideAll
      If overrideAll is false (the default), the injected json will be merged with the generated schema.
      JsonSchemaString[] strings
      Collection of String key/value pairs that will be injected.
    • Element Detail

      • json

        java.lang.String json
        JSON that will injected into the object or property node.
        Default:
        "{}"
      • jsonSupplier

        java.lang.Class<? extends java.util.function.Supplier<com.fasterxml.jackson.databind.JsonNode>> jsonSupplier
        Supplier of a JsonNode that will be injected. Applied after json().
        Default:
        com.kjetland.jackson.jsonSchema.annotations.JsonSchemaInject.None.class
      • jsonSupplierViaLookup

        java.lang.String jsonSupplierViaLookup
        Key to entry in JsonSchemaConfig.jsonSuppliers which will supply a JsonNode that will be injected. Applied after jsonSupplier().
        Default:
        ""
      • ints

        JsonSchemaInt[] ints
        Collection of Integer key/value pairs that will be injected. Applied after strings().
        Default:
        {}
      • bools

        JsonSchemaBool[] bools
        Collection of Boolean key/value pairs that will be injected. Applied after ints().
        Default:
        {}
      • overrideAll

        boolean overrideAll
        If overrideAll is false (the default), the injected json will be merged with the generated schema. If overrideAll is true, then we skip schema generation and use only the injected json.
        Default:
        false
      • javaxValidationGroups

        java.lang.Class<?>[] javaxValidationGroups
        Default:
        {}