code: @Override
      public MarkupDocBuilder apply(MarkupDocBuilder markupDocBuilder, DefinitionsDocument.Parameters params) {
          Map<String, Model> definitions = params.definitions;
          if (MapUtils.isNotEmpty(definitions)) {
              applyDefinitionsDocumentExtension(new Context(Position.DOCUMENT_BEFORE, markupDocBuilder));
              buildDefinitionsTitle(markupDocBuilder, labels.getLabel(Labels.DEFINITIONS));
              applyDefinitionsDocumentExtension(new Context(Position.DOCUMENT_BEGIN, markupDocBuilder));
              buildDefinitionsSection(markupDocBuilder, definitions);
              applyDefinitionsDocumentExtension(new Context(Position.DOCUMENT_END, markupDocBuilder));
              applyDefinitionsDocumentExtension(new Context(Position.DOCUMENT_AFTER, markupDocBuilder));
          }
          return markupDocBuilder;
      }
docs: Builds the definitions MarkupDocument.
  
  @return the definitions MarkupDocument