Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gen-spec.ts does not follow the OpenAPI specification, giving the same operatorId #13939

Closed
1 task
Lhcfl opened this issue Jun 2, 2024 · 2 comments
Closed
1 task
Labels
⚠️bug? This might be a bug

Comments

@Lhcfl
Copy link
Contributor

Lhcfl commented Jun 2, 2024

💡 Summary

gen-spec.ts does not follow the OpenAPI specification, giving the same operatorId, which causes problems when viewing api doc using other tools (such as Elements)

https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/openapi/gen-spec.ts#L214

operationId is an optional unique string used to identify an operation. If provided, these IDs must be unique among all operations described in your API. https://swagger.io/docs/specification/paths-and-operations/

🥰 Expected Behavior

get and post should use different operatorId

🤬 Actual Behavior

gen-spec.ts does not follow the OpenAPI specification, giving the same operatorId, which causes problems when viewing api doc using other tools (such as Elements)

An example is:

"/emoji": {
            "get": {
                "operationId": "emoji",
                 // ...
            }
            "post": {
                "operationId": "emoji",

📝 Steps to Reproduce

No response

💻 Frontend Environment

No response

🛰 Backend Environment (for server admin)

No response

Do you want to address this bug yourself?

  • Yes, I will patch the bug myself and send a pull request
@Lhcfl Lhcfl added the ⚠️bug? This might be a bug label Jun 2, 2024
@Sayamame-beans
Copy link
Member

related: #13498

@kakkokari-gtyih
Copy link
Contributor

Duplicate of #13498

@kakkokari-gtyih kakkokari-gtyih marked this as a duplicate of #13498 Jun 9, 2024
@kakkokari-gtyih kakkokari-gtyih closed this as not planned Won't fix, can't repro, duplicate, stale Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚠️bug? This might be a bug
Projects
None yet
Development

No branches or pull requests

3 participants