fief-dev / fief

Users and authentication management SaaS
https://www.fief.dev
Other
486 stars 42 forks source link

OpenAPI schema is not generated for create and update users #287

Open frankie567 opened 8 months ago

frankie567 commented 8 months ago

As mentioned by @pcnoic in https://github.com/orgs/fief-dev/discussions/285.

Probably because we dynamically generate the fields schema. At least, we could hard-code the basic schema in the endpoint decorator.

pcnoic commented 8 months ago

@frankie567 is it a hard requirement that the user_create and user_update params are dynamically generated schemas? Testing it with user_create: schemas.user.UserCreateAdmin solves the issue.

If the above is not an option I believe the only way to go now is to set the following in the decorator:

request_model=schemas.user.UserCreateAdmin

and for the user_update accordingly.