feat: 替换swagger2为OpenAPI3
This commit is contained in:
+2
-2
@@ -5,7 +5,7 @@ import com.central.admin.properties.IndexProperties;
|
||||
import com.central.admin.service.IIndexService;
|
||||
import com.central.common.model.PageResult;
|
||||
import com.central.common.model.Result;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -20,7 +20,7 @@ import java.util.*;
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@Api(tags = "索引管理api")
|
||||
@Tag(name = "索引管理api")
|
||||
@RequestMapping("/admin")
|
||||
public class IndexController {
|
||||
@Autowired
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.central.search.controller;
|
||||
|
||||
import com.central.search.service.IAggregationService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -16,7 +16,7 @@ import java.util.Map;
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@Api(tags = "搜索模块api")
|
||||
@Tag(name = "搜索模块api")
|
||||
@RequestMapping("/agg")
|
||||
public class AggregationController {
|
||||
private final IAggregationService aggregationService;
|
||||
|
||||
+2
-2
@@ -5,9 +5,9 @@ import com.central.common.model.*;
|
||||
import com.central.search.model.SearchDto;
|
||||
import com.central.search.service.ISearchService;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -19,7 +19,7 @@ import java.io.IOException;
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@Api(tags = "搜索模块api")
|
||||
@Tag(name = "搜索模块api")
|
||||
@RequestMapping("/search")
|
||||
public class SearchController {
|
||||
private final ISearchService searchService;
|
||||
|
||||
@@ -4,12 +4,25 @@ spring:
|
||||
username: ${zlt.elasticsearch.username}
|
||||
password: ${zlt.elasticsearch.password}
|
||||
|
||||
springdoc:
|
||||
swagger-ui:
|
||||
path: /swagger-ui.html
|
||||
tags-sorter: alpha
|
||||
operations-sorter: alpha
|
||||
api-docs:
|
||||
path: /v3/api-docs
|
||||
group-configs:
|
||||
- group: 'search'
|
||||
paths-to-match: '/**'
|
||||
packages-to-scan: com.central.search.controller
|
||||
default-flat-param-object: true
|
||||
|
||||
knife4j:
|
||||
enable: true
|
||||
setting:
|
||||
language: zh_cn
|
||||
swagger-model-name: 搜索中心接口文档
|
||||
|
||||
zlt:
|
||||
indices:
|
||||
show: sys-log-*,mysql-slowlog-*,sys_user,point-log-*,audit-log-*
|
||||
swagger:
|
||||
enabled: true
|
||||
title: 搜索中心
|
||||
description: 搜索中心接口文档
|
||||
version: 1.0
|
||||
base-package: com.central.search.controller
|
||||
show: sys-log-*,mysql-slowlog-*,sys_user,point-log-*,audit-log-*
|
||||
Reference in New Issue
Block a user