private void buildDescriptionSection ( MarkupDocBuilder markupDocBuilder , PathOperation operation ) { MarkupDocBuilder descriptionBuilder = copyMarkupDocBuilder ( markupDocBuilder ) ; applyPathsDocumentExtension ( new PathsDocumentExtension . Context ( Position . OPERATION_DESCRIPTION_BEGIN , descriptionBuilder , operation ) ) ; String description = operation . getOperation ( ) . getDescription ( ) ; if ( isNotBlank ( description ) ) { descriptionBuilder . paragraph ( markupDescription ( config . getSwaggerMarkupLanguage ( ) , markupDocBuilder , description ) ) ; } applyPathsDocumentExtension ( new PathsDocumentExtension . Context ( Position . OPERATION_DESCRIPTION_END , descriptionBuilder , operation ) ) ; String descriptionContent = descriptionBuilder . toString ( ) ; applyPathsDocumentExtension ( new PathsDocumentExtension . Context ( Position . OPERATION_DESCRIPTION_BEFORE , markupDocBuilder , operation ) ) ; if ( isNotBlank ( descriptionContent ) ) { buildSectionTitle ( markupDocBuilder , labels . getLabel ( DESCRIPTION ) ) ; markupDocBuilder . text ( descriptionContent ) ; } applyPathsDocumentExtension ( new PathsDocumentExtension . Context ( Position . OPERATION_DESCRIPTION_AFTER , markupDocBuilder , operation ) ) ; }
Adds a operation description to the document .