From 56050aa6501f3d9d2f79a2c40a28815878ac56ee Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期四, 24 十一月 2022 15:14:47 +0800 Subject: [PATCH] update 同步 ruoyi 相关提交 * fix 修复Log注解GET请求记录不到参数问题 * fix 修复某些特性的环境生成代码变乱码TXT文件问题 * update 消除Vue3控制台出现的警告信息 * fix 开启TopNav没有子菜单隐藏侧边栏 * fix 修复回显数据字典数组异常问题(I60UYQ) * update 忽略不必要的属性数据返回 --- ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/SwaggerProperties.java | 87 ++++++++++++++++++++++++++++++++++++++----- 1 files changed, 76 insertions(+), 11 deletions(-) diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/SwaggerProperties.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/SwaggerProperties.java index 4a37fbc..736d70a 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/SwaggerProperties.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/SwaggerProperties.java @@ -1,13 +1,20 @@ package com.ruoyi.framework.config.properties; +import io.swagger.v3.oas.models.Components; +import io.swagger.v3.oas.models.ExternalDocumentation; +import io.swagger.v3.oas.models.Paths; +import io.swagger.v3.oas.models.info.Contact; +import io.swagger.v3.oas.models.info.License; +import io.swagger.v3.oas.models.tags.Tag; import lombok.Data; -import lombok.NoArgsConstructor; -import lombok.experimental.Accessors; import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.NestedConfigurationProperty; import org.springframework.stereotype.Component; +import java.util.List; + /** - * 楠岃瘉鐮� 閰嶇疆灞炴�� + * swagger 閰嶇疆灞炴�� * * @author Lion Li */ @@ -17,20 +24,78 @@ public class SwaggerProperties { /** - * 楠岃瘉鐮佺被鍨� + * 鏄惁寮�鍚� openApi 鏂囨。 */ - private Boolean enabled; + private Boolean enabled = true; + /** - * 楠岃瘉鐮佺被鍒� + * 鏂囨。鍩烘湰淇℃伅 */ - private String title; + @NestedConfigurationProperty + private InfoProperties info = new InfoProperties(); + /** - * 鏁板瓧楠岃瘉鐮佷綅鏁� + * 鎵╁睍鏂囨。鍦板潃 */ - private String description; + @NestedConfigurationProperty + private ExternalDocumentation externalDocs; + /** - * 瀛楃楠岃瘉鐮侀暱搴� + * 鏍囩 */ - private String version; + private List<Tag> tags = null; + + /** + * 璺緞 + */ + @NestedConfigurationProperty + private Paths paths = null; + + /** + * 缁勪欢 + */ + @NestedConfigurationProperty + private Components components = null; + + /** + * <p> + * 鏂囨。鐨勫熀纭�灞炴�т俊鎭� + * </p> + * + * @see io.swagger.v3.oas.models.info.Info + * + * 涓轰簡 springboot 鑷姩鐢熶骇閰嶇疆鎻愮ず淇℃伅锛屾墍浠ヨ繖閲屽鍒朵竴涓被鍑烘潵 + */ + @Data + public static class InfoProperties { + + /** + * 鏍囬 + */ + private String title = null; + + /** + * 鎻忚堪 + */ + private String description = null; + + /** + * 鑱旂郴浜轰俊鎭� + */ + @NestedConfigurationProperty + private Contact contact = null; + + /** + * 璁稿彲璇� + */ + @NestedConfigurationProperty + private License license = null; + + /** + * 鐗堟湰 + */ + private String version = null; + + } } -- Gitblit v1.9.3