¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * |
| | | * Copyright (c) 2018-2025, lengleng All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: lengleng (wangiegie@gmail.com) |
| | | * |
| | | */ |
| | | package org.springblade.core.swagger; |
| | | |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | import org.springblade.core.launch.constant.AppConstant; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * SwaggerProperties |
| | | * |
| | | * @author Chill |
| | | */ |
| | | @Data |
| | | @ConfigurationProperties("swagger") |
| | | public class SwaggerProperties { |
| | | /** |
| | | * swaggerä¼è§£æçå
è·¯å¾ |
| | | **/ |
| | | private List<String> basePackages = new ArrayList<>(Collections.singletonList(AppConstant.BASE_PACKAGES)); |
| | | /** |
| | | * swaggerä¼è§£æçurlè§å |
| | | **/ |
| | | private List<String> basePath = new ArrayList<>(); |
| | | /** |
| | | * å¨basePathåºç¡ä¸éè¦æé¤çurlè§å |
| | | **/ |
| | | private List<String> excludePath = new ArrayList<>(); |
| | | /** |
| | | * æ é¢ |
| | | **/ |
| | | private String title = "BladeX æ¥å£ææ¡£ç³»ç»"; |
| | | /** |
| | | * æè¿° |
| | | **/ |
| | | private String description = "BladeX æ¥å£ææ¡£ç³»ç»"; |
| | | /** |
| | | * çæ¬ |
| | | **/ |
| | | private String version = AppConstant.APPLICATION_VERSION; |
| | | /** |
| | | * 许å¯è¯ |
| | | **/ |
| | | private String license = "Powered By BladeX"; |
| | | /** |
| | | * 许å¯è¯URL |
| | | **/ |
| | | private String licenseUrl = "https://bladex.vip"; |
| | | /** |
| | | * æå¡æ¡æ¬¾URL |
| | | **/ |
| | | private String termsOfServiceUrl = "https://bladex.vip"; |
| | | |
| | | /** |
| | | * hostä¿¡æ¯ |
| | | **/ |
| | | private String host = ""; |
| | | /** |
| | | * èç³»äººä¿¡æ¯ |
| | | */ |
| | | private Contact contact = new Contact(); |
| | | /** |
| | | * å
¨å±ç»ä¸é´æé
ç½® |
| | | **/ |
| | | private Authorization authorization = new Authorization(); |
| | | |
| | | @Data |
| | | @NoArgsConstructor |
| | | public static class Contact { |
| | | |
| | | /** |
| | | * è系人 |
| | | **/ |
| | | private String name = "chillzhuang"; |
| | | /** |
| | | * è系人url |
| | | **/ |
| | | private String url = "https://gitee.com/smallc"; |
| | | /** |
| | | * è系人email |
| | | **/ |
| | | private String email = "smallchill@163.com"; |
| | | |
| | | } |
| | | |
| | | @Data |
| | | @NoArgsConstructor |
| | | public static class Authorization { |
| | | |
| | | /** |
| | | * é´æçç¥IDï¼éè¦åSecurityReferences IDä¿æä¸è´ |
| | | */ |
| | | private String name = ""; |
| | | |
| | | /** |
| | | * éè¦å¼å¯é´æURLçæ£å |
| | | */ |
| | | private String authRegex = "^.*$"; |
| | | |
| | | /** |
| | | * é´æä½ç¨åå表 |
| | | */ |
| | | private List<AuthorizationScope> authorizationScopeList = new ArrayList<>(); |
| | | |
| | | /** |
| | | * é´æè¯·æ±å¤´åæ°å表 |
| | | */ |
| | | private List<AuthorizationApiKey> authorizationApiKeyList = new ArrayList<>(); |
| | | |
| | | /** |
| | | * æ¥å£å¹é
å°å |
| | | */ |
| | | private List<String> tokenUrlList = new ArrayList<>(); |
| | | } |
| | | |
| | | @Data |
| | | @NoArgsConstructor |
| | | public static class AuthorizationScope { |
| | | |
| | | /** |
| | | * é´æçç¥å, éè¦åApiKeyçnameä¿æä¸è´ |
| | | */ |
| | | private String name = ""; |
| | | /** |
| | | * ä½ç¨ååç§° |
| | | */ |
| | | private String scope = ""; |
| | | |
| | | /** |
| | | * ä½ç¨åæè¿° |
| | | */ |
| | | private String description = ""; |
| | | |
| | | } |
| | | |
| | | @Data |
| | | @NoArgsConstructor |
| | | public static class AuthorizationApiKey { |
| | | |
| | | /** |
| | | * åæ°å |
| | | */ |
| | | private String name = ""; |
| | | |
| | | /** |
| | | * åæ°å¼ |
| | | */ |
| | | private String keyName = ""; |
| | | |
| | | /** |
| | | * åæ°ä½ç¨å |
| | | */ |
| | | private String passAs = ""; |
| | | |
| | | } |
| | | } |