-
-
Notifications
You must be signed in to change notification settings - Fork 203
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
OAPI : #[salvo(schema(name = XXX))] expects an identifier instead of a "string" literal #832
Comments
I don't think it's a bug, because in the first one you're using NoteThe |
Thank you very much for your remarks, Is it normal that |
It was with Ultimately, Salvo is not stable yet, so you should expect changes like this. |
Should we close this issue? It's not a bug |
I think it should be kept open, “name” should take a literal string so as not to cause confusion with an already existing type/struct. |
@chrislearn What do you think? will Salvo support this? if yes we should open this issue. For me, I think we should not, I think using identifier only is better. |
I think this decision can be left to the users, as they may have different usage preferences. |
Hello,
Describe the bug :
An error now occurs in new versions of Salvo with OpenAPI :
gives this error :
error: expected identifier
but by using an identifier instead of a string, it works.
#[salvo(schema(name = City))]
Normally name must take a literal string as parameter instead of an identifier, otherwise it may be confused with variables in the code.
And the weirdest thing is that it works on some names and not others:
it works for LoginDTO but not for CityDTO !!
**Salvo version : **
The text was updated successfully, but these errors were encountered: