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

Swagger yaml and json generated api don't have basic auth so openapi generation failed to genered good code #186

Closed
yodatak opened this issue Sep 8, 2023 · 3 comments
Labels
🪲 bug Something isn't working 🎛️ server There are things to do on the server

Comments

@yodatak
Copy link

yodatak commented Sep 8, 2023

npx @openapitools/openapi-generator-cli generate -i https://demo.gamevau.lt/api/docs-yaml -g rust -o /tmp/test2/

and we don't get good code because of lack of
https://swagger.io/docs/specification/authentication/

exemple

paths:
  /something:
    get:
      security:
        - basicAuth: []
basicAuth:     # <-- arbitrary name for the security scheme
  type: http
  scheme: basic
@yodatak yodatak added 🎛️ server There are things to do on the server 🪲 bug Something isn't working labels Sep 8, 2023
@yodatak
Copy link
Author

yodatak commented Sep 8, 2023

I think it come from
https://docs.nestjs.com/openapi/security

maybe it lack
@ApiBasicAuth()

near
@controller("games")

@yodatak
Copy link
Author

yodatak commented Sep 8, 2023

i got some error in using the api in rust is it a database issue ?
Error sending message: error in serde: missing field games at line 52 column 5

@Alfagun74
Copy link
Contributor

fixed in v5.0.0, i dont know where the error you posted comes from

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪲 bug Something isn't working 🎛️ server There are things to do on the server
Projects
Archived in project
Development

No branches or pull requests

2 participants