Class $Refs


  • public class $Refs
    extends Object
    • Field Detail

      • circular

        public boolean circular
      • file

        public final URL file
      • rootDir

        public final URL rootDir
    • Method Detail

      • getOriginalRefsList

        public List<org.apache.commons.lang3.tuple.Pair<$Ref,​Object>> getOriginalRefsList()
      • getOriginalRef

        public $Ref getOriginalRef​(Object obj)
      • getObjectForRef

        public Object getObjectForRef​($Ref ref)
      • isOriginalRef

        protected boolean isOriginalRef​(Object value,
                                        Object savedValue,
                                        Object originalAllOf)
      • addRef

        public void addRef​(String ref)
      • addPath

        public void addPath​(URL url)
      • saveOriginalRef

        public void saveOriginalRef​($Ref originalRef,
                                    Object resolved)
      • saveOriginalAllOf

        public void saveOriginalAllOf​(Map<String,​Object> resolvedAllOf,
                                      List originalAllOf)
      • paths

        public List<String> paths​(String... types)
        Returns the paths/URLs of all the files in your schema (including the main schema file).
        Parameters:
        types - (optional) Optionally only return certain types of paths ("file", "http", etc.)
        Returns:
        paths/URLs of all files in your schema
      • getJsonLocationRange

        public org.apache.commons.lang3.tuple.Pair<com.fasterxml.jackson.core.JsonLocation,​com.fasterxml.jackson.core.JsonLocation> getJsonLocationRange​(String jsonPath)
      • getJsonLocationRange

        public org.apache.commons.lang3.tuple.Pair<com.fasterxml.jackson.core.JsonLocation,​com.fasterxml.jackson.core.JsonLocation> getJsonLocationRange​(URL fileURL,
                                                                                                                                                               String jsonPath)
      • get

        public <T> T get​(String $ref,
                         Class<T> type)
      • set

        public void set​(String $ref,
                        Object value)
        Sets the value at the given path in the schema. If the property, or any of its parents, don't exist, they will be created.
        Parameters:
        $ref - The JSON Reference path, optionally with a JSON Pointer in the hash
        value - The value to assign. Can be anything (object, string, number, etc.)