Class Resolver

java.lang.Object
dk.mada.jaxrs.openapi.Resolver

public final class Resolver extends Object
Works through a parsed model that contains parser type references and resolves them to pure model types.
  • Constructor Details

    • Resolver

      public Resolver(ParserOpts parserOpts, TypeNames typeNames, ParserTypes parserTypes, ConflictRenamer conflictRenamer)
      Create new instance.
      Parameters:
      parserOpts - the parser options
      typeNames - the type names instance
      parserTypes - the types collected during parsing
      conflictRenamer - the conflict renamer
  • Method Details

    • getDtos

      public List<Dto> 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

      public Operations operations(Operations ops)
      Resolves parser type references in operations.
      Parameters:
      ops - the operations to resolve types in
      Returns:
      operations with pure model types