All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.rmannibucau.jaxrsanalyzer.backend.EnrichedAsciidocBackend Maven / Gradle / Ivy

package com.github.rmannibucau.jaxrsanalyzer.backend;

import static java.util.Optional.ofNullable;

import com.sebastian_daschner.jaxrs_analyzer.backend.asciidoc.AsciiDocBackend;
import com.sebastian_daschner.jaxrs_analyzer.model.rest.ResourceMethod;

public class EnrichedAsciidocBackend extends AsciiDocBackend {

    @Override
    protected void appendMethod(final String baseUri, final String resource, final ResourceMethod resourceMethod) {
        super.appendMethod(baseUri, resource, resourceMethod);
        ofNullable(resourceMethod.getDescription())
                .ifPresent(d -> builder.append(d.replaceAll("\n +", "\n")).append("\n\n"));
    }

    @Override
    public String getName() {
        return "asciidoc"; // until https://github.com/sdaschner/jaxrs-analyzer-maven-plugin/issues/50 is fixed
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy