Skip to content

bug: openapi schema is invalid #406

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

Open
williamhorning opened this issue Mar 30, 2025 · 1 comment
Open

bug: openapi schema is invalid #406

williamhorning opened this issue Mar 30, 2025 · 1 comment

Comments

@williamhorning
Copy link

williamhorning commented Mar 30, 2025

Both /servers/{target}/permissions/default and /channels/{target}/permissions/default have the same operationId of permissions_set_default_set_default_permissions. This is invalid, as the OpenAPI spec requires unique operationIds. If I had to guess, renaming one of the functions in either crates/delta/src/routes/channels/permissions_set_default.rs or crates/delta/src/routes/servers/permissions_set_default.rs would get that to be valid

@Docteh
Copy link
Contributor

Docteh commented Apr 26, 2025

I did some digging, found that the OpenAPI generator's parent (upstream?) has support for overriding the operation id. Added in GREsau/okapi#63

Maybe that could be ported over to revolts fork of okapi and then one of the endpoint tagged like
#[openapi(operation_id = "my_custom_id")]

maybe for servers do #[openapi(operation_id = "server_set_default_permissions")]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 Untriaged
Development

No branches or pull requests

2 participants