Skip to content

Conversation

@jaronnie
Copy link
Contributor

e.g.

"operationId": "network/firewall.Delete"

but not doc

删除防火墙规则

@jaronnie jaronnie changed the title fix(swagger): operation should use handler with group but not route doc first fix(swagger): operation id should use handler with group but not route doc first May 20, 2025
@codecov
Copy link

codecov bot commented May 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.37%. Comparing base (8690859) to head (bc022be).
Report is 340 commits behind head on master.

Additional details and impacted files

see 27 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kevwan kevwan requested a review from kesonan May 21, 2025 14:47
kesonan added a commit to kesonan/go-zero that referenced this pull request May 22, 2025
Security: security,
Parameters: parametersFromType(ctx, route.Method, route.RequestType),
Responses: jsonResponseFromType(ctx, route.AtDoc, route.ResponseType),
ID: getStringFromKVOrDefault(route.AtDoc.Properties, propertyKeyOperationId, getFirstUsableString(func() string {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the following code instead

groupName := getStringFromKVOrDefault(group.Annotation.Properties, propertyKeyGroup, "")
operationId := route.Handler
if len(groupName) > 0 {
  operationId = stringx.From(groupName + "_" + route.Handler).ToCamel()
}
operationId = stringx.From(operationId).Untitle()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I see you have made changes in your branch, so I won't commit.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we resolve this conversation?

kesonan added a commit to kesonan/go-zero that referenced this pull request May 23, 2025
kesonan added a commit to kesonan/go-zero that referenced this pull request May 23, 2025
kesonan added a commit to kesonan/go-zero that referenced this pull request May 23, 2025
@kesonan kesonan added the do-not-merge/hold Indicates that a PR should not merge because of known issues or need more discussion. label May 23, 2025
kevwan pushed a commit to kesonan/go-zero that referenced this pull request May 24, 2025
kevwan pushed a commit to kesonan/go-zero that referenced this pull request May 24, 2025
@jaronnie
Copy link
Contributor Author

close with: #4890

@jaronnie jaronnie closed this May 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/hold Indicates that a PR should not merge because of known issues or need more discussion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants