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

Directly require specific params #15

Open
matievisthekat opened this issue Mar 23, 2022 · 3 comments
Open

Directly require specific params #15

matievisthekat opened this issue Mar 23, 2022 · 3 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@matievisthekat
Copy link
Member

matievisthekat commented Mar 23, 2022

... instead of the whole model

This would force requests to be sent like this:

{
  "email": "[email protected]"
  "password": "12345678"
}

rather than the current format:

{
  "user": {
    "email": "[email protected]"
    "password": "12345678"
  }
}
@matievisthekat matievisthekat added the enhancement New feature or request label Mar 23, 2022
@matievisthekat
Copy link
Member Author

looking for opinions:

is it nicer to send a body like this:

{
  "user": {
    "email": "[email protected]"
    "password": "12345678"
  }
}

or rather like this:

{
  "email": "[email protected]"
  "password": "12345678"
}

the first option is much clearer, but it does get a bit annoying having to use that extra object

@matievisthekat
Copy link
Member Author

This would also remove this annoying error message:
Screenshot_20220325_150522

which doesnt actually tell you what you are missing

@matievisthekat matievisthekat changed the title Directly require specific params instead of whole model Directly require specific params Apr 25, 2022
@matievisthekat
Copy link
Member Author

i guess better documentation would change this.

@matievisthekat matievisthekat added the documentation Improvements or additions to documentation label Apr 26, 2022
@matievisthekat matievisthekat self-assigned this Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

1 participant