Package io.vertx.json.schema
Interface Ref
-
public interface RefJsonObject$refresolver. This interface is used to resolve$refin aJsonObject. The result is a newJsonObjectwith all the$refreplaced by actual object references. This new object allows navigation and queries usingJsonPointerbut will not be able to be encoded back to JSON when circular dependencies are present. The resolver will only resolve local references as defined in RFC3986. A local reference is a reference that starts with#and is followed by a valid JSON Pointer.- Author:
- Paulo Lopes
-
-
Method Summary
Static Methods Modifier and Type Method Description static JsonObjectresolve(JsonObject json)Resolve all$refin the givenJsonObject.
-
-
-
Method Detail
-
resolve
static JsonObject resolve(JsonObject json)
Resolve all$refin the givenJsonObject. The resolution algorithm is not aware of other specifications. When resolving OpenAPI documents (which only allow$refat specific locations) you should validate if the document is valid before performing a resolution. It is important to note that any sibling elements of a$refis ignored. This is because$refworks by replacing itself and everything on its level with the definition it is pointing at.- Parameters:
json- the JSON object to resolve.- Returns:
- a new JSON object with all the
$refreplaced by actual object references. - Throws:
IllegalArgumentException- when the input JSON is not valid.UnsupportedOperationException- reducing the JSON pointer to a value is undefined.
-
-