package ink.wgink.properties.swagger;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @ClassName: SwaggerProperties
 * @Description: swagger配置
 * @Author: wanggeng
 * @Date: 2022/5/12 14:21
 * @Version: 1.0
 */
@Component
@ConfigurationProperties(prefix = "swagger")
public class SwaggerProperties {

    private Boolean active;
    private String title;
    private String description;
    private String host;
    private String version;

    public Boolean getActive() {
        return active == null ? true : active;
    }

    public void setActive(Boolean active) {
        this.active = active;
    }

    public String getTitle() {
        return title == null ? "相关接口文档" : title.trim();
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescription() {
        return description == null ? "相关接口文档" : description.trim();
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getHost() {
        return host == null ? "http://www.wgink.ink" : host.trim();
    }

    public void setHost(String host) {
        this.host = host;
    }

    public String getVersion() {
        return version == null ? "" : version.trim();
    }

    public void setVersion(String version) {
        this.version = version;
    }
}
