Package dk.mada.jaxrs.openapi
Class Resolver
java.lang.Object
dk.mada.jaxrs.openapi.Resolver
Works through a parsed model that contains parser type references and resolves them to pure model types.
-
Constructor Summary
ConstructorDescriptionResolver
(ParserOpts parserOpts, TypeNames typeNames, ParserTypes parserTypes, ConflictRenamer conflictRenamer) Create new instance. -
Method Summary
Modifier and TypeMethodDescriptiongetDtos()
Converts the ParserTypes into finally resolved and mapped DTOs for the model.operations
(Operations ops) Resolves parser type references in operations.
-
Constructor Details
-
Resolver
public Resolver(ParserOpts parserOpts, TypeNames typeNames, ParserTypes parserTypes, ConflictRenamer conflictRenamer) Create new instance.- Parameters:
parserOpts
- the parser optionstypeNames
- the type names instanceparserTypes
- the types collected during parsingconflictRenamer
- the conflict renamer
-
-
Method Details
-
getDtos
Converts the ParserTypes into finally resolved and mapped DTOs for the model. First the DTOs are renamed (if necessary) to resolve name conflicts. Then references to DTOs are resolved, changing parser- references to model-references. Note that this updates the resolver/ParserTypes state with renames and type mappings.- Returns:
- DTOs for the model
-
operations
Resolves parser type references in operations.- Parameters:
ops
- the operations to resolve types in- Returns:
- operations with pure model types
-