swagger2markup/src/main/java/io/github/swagger2markup/internal/document/DefinitionsDocument.java
/**
     * Generate definition files depending on the generation mode
     *
     * @param definitionName definition name to process
     * @param model          definition model to process
     */
Generate definition files depending on the generation mode
@param definitionName definition name to process
@param model          definition model to process
Generate definition files depending on the generation mode @param definitionName definition name to process @param model definition model to process
private void buildDefinition(MarkupDocBuilder markupDocBuilder, String definitionName, Model model) {
        if (logger.isDebugEnabled()) {
            logger.debug("Definition processed : '{}'", definitionName);
        }
        if (config.isSeparatedDefinitionsEnabled()) {
            MarkupDocBuilder defDocBuilder = copyMarkupDocBuilder(markupDocBuilder);
            applyDefinitionComponent(defDocBuilder, definitionName, model);
            Path definitionFile = context.getOutputPath().resolve(definitionDocumentNameResolver.apply(definitionName));
            defDocBuilder.writeToFileWithoutExtension(definitionFile, StandardCharsets.UTF_8);
            if (logger.isDebugEnabled()) {
                logger.debug("Separate definition file produced : '{}'", definitionFile);
            }
            definitionRef(markupDocBuilder, definitionName);
        } else {
            applyDefinitionComponent(markupDocBuilder, definitionName, model);
        }
    }
private void buildDefinition ( MarkupDocBuilder markupDocBuilder , String definitionName , Model model ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Definition processed : '{}'" , definitionName ) ; } if ( config . isSeparatedDefinitionsEnabled ( ) ) { MarkupDocBuilder defDocBuilder = copyMarkupDocBuilder ( markupDocBuilder ) ; applyDefinitionComponent ( defDocBuilder , definitionName , model ) ; Path definitionFile = context . getOutputPath ( ) . resolve ( definitionDocumentNameResolver . apply ( definitionName ) ) ; defDocBuilder . writeToFileWithoutExtension ( definitionFile , StandardCharsets . UTF_8 ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Separate definition file produced : '{}'" , definitionFile ) ; } definitionRef ( markupDocBuilder , definitionName ) ; } else { applyDefinitionComponent ( markupDocBuilder , definitionName , model ) ; } }
Generate definition files depending on the generation mode
 @param definitionName definition name to process
 @param model          definition model to process
Generate definition files depending on the generation mode @param definitionName definition name to process @param model definition model to process