Package io.swagger.v3.parser
Class ResolverCache
- java.lang.Object
-
- io.swagger.v3.parser.ResolverCache
-
public class ResolverCache extends Object
A class that caches values that have been loaded so we don't have to repeat expensive operations like: 1) reading a remote URL with authorization (e.g. using RemoteURL.java) 2) reading the contents of a file into memory 3) extracting a sub object from a json/yaml tree 4) de-serializing json strings into objects
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanopenapi31
-
Constructor Summary
Constructors Constructor Description ResolverCache(io.swagger.v3.oas.models.OpenAPI openApi, List<AuthorizationValue> auths, String parentFileLocation)ResolverCache(io.swagger.v3.oas.models.OpenAPI openApi, List<AuthorizationValue> auths, String parentFileLocation, Set<String> resolveValidationMessages)ResolverCache(io.swagger.v3.oas.models.OpenAPI openApi, List<AuthorizationValue> auths, String parentFileLocation, Set<String> resolveValidationMessages, ParseOptions parseOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddReferencedKey(String modelKey)Map<String,String>getExternalFileCache()ParseOptionsgetParseOptions()Map<String,String>getRenameCache()StringgetRenamedRef(String originalRef)Map<String,Object>getResolutionCache()booleanhasReferencedKey(String modelKey)<T> TloadRef(String ref, RefFormat refFormat, Class<T> expectedType)protected Stringmerge(String host, String ref)voidputRenamedRef(String originalRef, String newRef)protected <T> voidupdateLocalRefs(String file, io.swagger.v3.oas.models.media.Schema schema)protected <T> voidupdateLocalRefs(String file, T result)
-
-
-
Constructor Detail
-
ResolverCache
public ResolverCache(io.swagger.v3.oas.models.OpenAPI openApi, List<AuthorizationValue> auths, String parentFileLocation)
-
ResolverCache
public ResolverCache(io.swagger.v3.oas.models.OpenAPI openApi, List<AuthorizationValue> auths, String parentFileLocation, Set<String> resolveValidationMessages)
-
ResolverCache
public ResolverCache(io.swagger.v3.oas.models.OpenAPI openApi, List<AuthorizationValue> auths, String parentFileLocation, Set<String> resolveValidationMessages, ParseOptions parseOptions)
-
-
Method Detail
-
updateLocalRefs
protected <T> void updateLocalRefs(String file, T result)
-
updateLocalRefs
protected <T> void updateLocalRefs(String file, io.swagger.v3.oas.models.media.Schema schema)
-
hasReferencedKey
public boolean hasReferencedKey(String modelKey)
-
addReferencedKey
public void addReferencedKey(String modelKey)
-
getParseOptions
public ParseOptions getParseOptions()
-
-