Class BasicBeanDefMapper

java.lang.Object
org.apache.juneau.jsonschema.BasicBeanDefMapper
All Implemented Interfaces:
BeanDefMapper

public class BasicBeanDefMapper extends Object implements BeanDefMapper
Simple implementation of the BeanDefMapper interface.

IDs are created by calling Class.getSimpleName().

URIs are constructed using the pattern "#/definitions/{id}".

See Also:
  • Constructor Details

  • Method Details

    • getId

      public String getId(ClassMeta<?> cm)
      Description copied from interface: BeanDefMapper
      Returns the ID for the specified class.
      Specified by:
      getId in interface BeanDefMapper
      Parameters:
      cm - The class.
      Returns:
      The ID for the specified class.
    • getURI

      public URI getURI(ClassMeta<?> cm)
      Description copied from interface: BeanDefMapper
      Returns the URI for the specified class.
      Specified by:
      getURI in interface BeanDefMapper
      Parameters:
      cm - The class.
      Returns:
      The URI for the specified class.
    • getURI

      public URI getURI(String id)
      Description copied from interface: BeanDefMapper
      Returns the URI for the specified class by its ID.
      Specified by:
      getURI in interface BeanDefMapper
      Parameters:
      id - The class ID.
      Returns:
      The URI for the specified class.