io.openapitools.swagger.config.SwaggerExternalDoc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of swagger-maven-plugin Show documentation
Show all versions of swagger-maven-plugin Show documentation
Maven plugin to generate OpenAPI documentation using Swagger.
The newest version!
package io.openapitools.swagger.config;
import java.util.Collections;
import java.util.Map;
import org.apache.maven.plugins.annotations.Parameter;
import io.swagger.v3.oas.models.ExternalDocumentation;
public class SwaggerExternalDoc {
/**
* A short description of the target documentation. CommonMark syntax MAY be
* used for rich text representation.
*/
@Parameter
private String description;
/**
* REQUIRED. The URL for the target documentation. Value MUST be in the format
* of a URL.
*/
@Parameter(required = true)
private String url;
@Parameter
private Map extensions = Collections.emptyMap();
public ExternalDocumentation createExternalDocModel() {
ExternalDocumentation externalDoc = new ExternalDocumentation();
if (description != null) {
externalDoc.setDescription(description);
}
if (url != null) {
externalDoc.setUrl(url);
}
externalDoc.setExtensions(extensions);
return externalDoc;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy