mirror of
https://gitee.com/ssssssss-team/magic-api.git
synced 2026-06-09 10:23:53 +08:00
Swagger固化operationId
This commit is contained in:
@@ -221,7 +221,7 @@ public class SwaggerEntity {
|
||||
|
||||
private String description;
|
||||
|
||||
private String operationId = UUID.randomUUID().toString().replace("-", "");
|
||||
private String operationId;
|
||||
|
||||
private List<String> produces = new ArrayList<>();
|
||||
|
||||
@@ -247,7 +247,7 @@ public class SwaggerEntity {
|
||||
return operationId;
|
||||
}
|
||||
|
||||
public void setOperationId(String operationId) {
|
||||
public Path(String operationId) {
|
||||
this.operationId = operationId;
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ public class SwaggerProvider {
|
||||
for (ApiInfo info : infos) {
|
||||
String groupName = groupServiceProvider.getFullName(info.getGroupId()).replace("/", "-");
|
||||
String requestPath = "/" + mappingHandlerMapping.getRequestPath(info.getGroupId(), info.getPath());
|
||||
SwaggerEntity.Path path = new SwaggerEntity.Path();
|
||||
SwaggerEntity.Path path = new SwaggerEntity.Path(info.getId());
|
||||
path.addTag(groupName);
|
||||
boolean hasBody = false;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user