Swagger固化operationId

This commit is contained in:
mxd
2021-09-12 14:04:01 +08:00
parent 49b627fcd7
commit b91f502e4e
2 changed files with 3 additions and 3 deletions

View File

@@ -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;
}

View File

@@ -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 {