src/main/java/io/github/swagger2markup/internal/component/DefinitionComponent.java
/**
     * Builds the type informations of a definition
     *
     * @param markupDocBuilder the docbuilder do use for output
     * @param definitionName   name of the definition to display
     * @param model            model of the definition to display
     * @return a list of inlined types.
     */
Builds the type informations of a definition
@param markupDocBuilder the docbuilder do use for output
@param definitionName   name of the definition to display
@param model            model of the definition to display
@return a list of inlined types.
Builds the type informations of a definition @param markupDocBuilder the docbuilder do use for output @param definitionName name of the definition to display @param model model of the definition to display @return a list of inlined types .
private List<ObjectType> typeSection(MarkupDocBuilder markupDocBuilder, String definitionName, Model model) {
        List<ObjectType> inlineDefinitions = new ArrayList<>();
        Type modelType = ModelUtils.resolveRefType(ModelUtils.getType(model, definitions, definitionsDocumentResolver));
        if (!(modelType instanceof ObjectType) && config.isInlineSchemaEnabled()) {
            modelType = createInlineType(modelType, definitionName, definitionName + " " + "inline", inlineDefinitions);
        }
        if (modelType instanceof ObjectType) {
            ObjectType objectType = (ObjectType) modelType;
            MarkupDocBuilder typeInfos = copyMarkupDocBuilder(markupDocBuilder);
            switch (objectType.getPolymorphism().getNature()) {
                case COMPOSITION:
                    typeInfos.italicText(labels.getLabel(POLYMORPHISM_COLUMN)).textLine(COLON + POLYMORPHISM_NATURE.get(objectType.getPolymorphism().getNature()));
                    break;
                case INHERITANCE:
                    typeInfos.italicText(labels.getLabel(POLYMORPHISM_COLUMN)).textLine(COLON + POLYMORPHISM_NATURE.get(objectType.getPolymorphism().getNature()));
                    typeInfos.italicText(labels.getLabel(POLYMORPHISM_DISCRIMINATOR_COLUMN)).textLine(COLON + objectType.getPolymorphism().getDiscriminator());
                    break;
                case NONE:
                    if (ALWAYS_DISPLAY_DISCRIMINATOR && isNotBlank(objectType.getPolymorphism().getDiscriminator()))
                        typeInfos.italicText(labels.getLabel(POLYMORPHISM_DISCRIMINATOR_COLUMN)).textLine(COLON + objectType.getPolymorphism().getDiscriminator());
                    break;
                default:
                    break;
            }
            String typeInfosString = typeInfos.toString();
            if (isNotBlank(typeInfosString))
                markupDocBuilder.paragraph(typeInfosString, true);
            Map<String, Property> properties = ((ObjectType) modelType).getProperties();
            if (!properties.isEmpty()) {
                propertiesTableComponent.apply(markupDocBuilder,
                        PropertiesTableComponent.parameters(
                                properties,
                                definitionName,
                                inlineDefinitions));
            }
        } else if (modelType != null) {
            MarkupDocBuilder typeInfos = copyMarkupDocBuilder(markupDocBuilder);
            typeInfos.italicText(labels.getLabel(TYPE_COLUMN)).textLine(COLON + modelType.displaySchema(markupDocBuilder));
            markupDocBuilder.paragraph(typeInfos.toString());
        }
        return inlineDefinitions;
    }
private List < ObjectType > typeSection ( MarkupDocBuilder markupDocBuilder , String definitionName , Model model ) { List < ObjectType > inlineDefinitions = new ArrayList < > ( ) ; Type modelType = ModelUtils . resolveRefType ( ModelUtils . getType ( model , definitions , definitionsDocumentResolver ) ) ; if ( ! ( modelType instanceof ObjectType ) && config . isInlineSchemaEnabled ( ) ) { modelType = createInlineType ( modelType , definitionName , definitionName + " " + "inline" , inlineDefinitions ) ; } if ( modelType instanceof ObjectType ) { ObjectType objectType = ( ObjectType ) modelType ; MarkupDocBuilder typeInfos = copyMarkupDocBuilder ( markupDocBuilder ) ; switch ( objectType . getPolymorphism ( ) . getNature ( ) ) { case COMPOSITION : typeInfos . italicText ( labels . getLabel ( POLYMORPHISM_COLUMN ) ) . textLine ( COLON + POLYMORPHISM_NATURE . get ( objectType . getPolymorphism ( ) . getNature ( ) ) ) ; break ; case INHERITANCE : typeInfos . italicText ( labels . getLabel ( POLYMORPHISM_COLUMN ) ) . textLine ( COLON + POLYMORPHISM_NATURE . get ( objectType . getPolymorphism ( ) . getNature ( ) ) ) ; typeInfos . italicText ( labels . getLabel ( POLYMORPHISM_DISCRIMINATOR_COLUMN ) ) . textLine ( COLON + objectType . getPolymorphism ( ) . getDiscriminator ( ) ) ; break ; case NONE : if ( ALWAYS_DISPLAY_DISCRIMINATOR && isNotBlank ( objectType . getPolymorphism ( ) . getDiscriminator ( ) ) ) typeInfos . italicText ( labels . getLabel ( POLYMORPHISM_DISCRIMINATOR_COLUMN ) ) . textLine ( COLON + objectType . getPolymorphism ( ) . getDiscriminator ( ) ) ; break ; default : break ; } String typeInfosString = typeInfos . toString ( ) ; if ( isNotBlank ( typeInfosString ) ) markupDocBuilder . paragraph ( typeInfosString , true ) ; Map < String , Property > properties = ( ( ObjectType ) modelType ) . getProperties ( ) ; if ( ! properties . isEmpty ( ) ) { propertiesTableComponent . apply ( markupDocBuilder , PropertiesTableComponent . parameters ( properties , definitionName , inlineDefinitions ) ) ; } } else if ( modelType != null ) { MarkupDocBuilder typeInfos = copyMarkupDocBuilder ( markupDocBuilder ) ; typeInfos . italicText ( labels . getLabel ( TYPE_COLUMN ) ) . textLine ( COLON + modelType . displaySchema ( markupDocBuilder ) ) ; markupDocBuilder . paragraph ( typeInfos . toString ( ) ) ; } return inlineDefinitions ; }
Builds the type informations of a definition
 @param markupDocBuilder the docbuilder do use for output
 @param definitionName   name of the definition to display
 @param model            model of the definition to display
 @return a list of inlined types.
Builds the type informations of a definition @param markupDocBuilder the docbuilder do use for output @param definitionName name of the definition to display @param model model of the definition to display @return a list of inlined types .