http method class does not match when using x-displayName extension in Korean with sortTagsAlphabetically=true
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 25.9k
- Forks
- 2.4k
- Avg merge
- 13h 10m
- Merged PRs (30d)
- 4
Description
Describe the bug
adding korean to the x-displayName extension and setting the sortTagsAlphabetically option, the correct http method class is not reflected in the sorted results.
To Reproduce
Steps to reproduce the behavior:
{
"tags": [
{
"name": "User",
"x-displayName": "사용자"
},
{
"name": "DGroup",
"x-displayName": "D그룹"
},
],
"paths": {
"/users": {
"get": {
"tags": [
"User"
],
},
},
"/users": {
"post": {
"tags": [
"User"
],
},
},
"/groups": {
"delete": {
"tags": [
"DGroup"
],
},
},
"/groups": {
"put": {
"tags": [
"DGroup"
],
},
}
}
}
build-docs result
get /users --> delete method class
post /users --> put method class
delete /groups --> get method class
put /groups --> post method class
When the sortTagsAlphabetically option is given, it is initially sorted based on the Tag name and then re-sorted based on x-displayName. At this time, the class name initially given to the method class is fixed based on the Tag name, and when reordered by x-displayName, the color will not match the method name as the class name will remain in the original location.
Expected behavior
even if reordering occurs, a class that matches the method name must be assigned.
OpenAPI description
3.1
Redocly Version(s)
1.2.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the supplied OpenAPI 3.1 example with sortTagsAlphabetically enabled and inspect how tags are reordered and method classes are assigned. Trace the sorting and class-assignment path, then verify that each operation retains the class matching its HTTP method after x-displayName reordering.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100