From 0b077806196ceb8a68af93f00880ccc70aee50c2 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期四, 07 七月 2022 18:08:14 +0800
Subject: [PATCH] add 整合 springdoc 移除 knife4j

---
 ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/SwaggerProperties.java |   77 +++++++++++++++++++++-----------------
 1 files changed, 43 insertions(+), 34 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 7293e1e..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,8 +1,14 @@
 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 org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.boot.context.properties.NestedConfigurationProperty;
 import org.springframework.stereotype.Component;
 
 import java.util.List;
@@ -18,74 +24,77 @@
 public class SwaggerProperties {
 
     /**
-     * 鏂囨。寮�鍏�
+     * 鏄惁寮�鍚� openApi 鏂囨。
      */
-    private Boolean enabled;
+    private Boolean enabled = true;
 
     /**
-     * 璁剧疆璇锋眰鐨勭粺涓�鍓嶇紑
+     * 鏂囨。鍩烘湰淇℃伅
      */
-    private String pathMapping;
+    @NestedConfigurationProperty
+    private InfoProperties info = new InfoProperties();
 
     /**
-     * 鏍囧ご
+     * 鎵╁睍鏂囨。鍦板潃
      */
-    private String title;
+    @NestedConfigurationProperty
+    private ExternalDocumentation externalDocs;
 
     /**
-     * 鎻忚堪
+     * 鏍囩
      */
-    private String description;
+    private List<Tag> tags = null;
 
     /**
-     * 椤圭洰鐗堟湰
+     * 璺緞
      */
-    private String version;
+    @NestedConfigurationProperty
+    private Paths paths = null;
 
     /**
-     * 鑱旂郴鏂瑰紡
+     * 缁勪欢
      */
-    private Contact contact;
+    @NestedConfigurationProperty
+    private Components components = null;
 
     /**
-     * 缁勯厤缃�
+     * <p>
+     * 鏂囨。鐨勫熀纭�灞炴�т俊鎭�
+     * </p>
+     *
+     * @see io.swagger.v3.oas.models.info.Info
+     *
+     * 涓轰簡 springboot 鑷姩鐢熶骇閰嶇疆鎻愮ず淇℃伅锛屾墍浠ヨ繖閲屽鍒朵竴涓被鍑烘潵
      */
-    private List<Groups> groups;
-
     @Data
-    @NoArgsConstructor
-    public static class Contact {
+    public static class InfoProperties {
 
         /**
-         * 鑱旂郴浜�
+         * 鏍囬
          */
-        private String name;
+        private String title = null;
 
         /**
-         * 鑱旂郴浜簎rl
+         * 鎻忚堪
          */
-        private String url;
+        private String description = null;
 
         /**
-         * 鑱旂郴浜篹mail
+         * 鑱旂郴浜轰俊鎭�
          */
-        private String email;
-
-    }
-
-    @Data
-    @NoArgsConstructor
-    public static class Groups {
+        @NestedConfigurationProperty
+        private Contact contact = null;
 
         /**
-         * 缁勫悕
+         * 璁稿彲璇�
          */
-        private String name;
+        @NestedConfigurationProperty
+        private License license = null;
 
         /**
-         * 鍩虹鍖呰矾寰�
+         * 鐗堟湰
          */
-        private String basePackage;
+        private String version = null;
 
     }
 

--
Gitblit v1.9.3