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

[SD-1474] - Fix User Create & Update actions on Platform API #11442

Merged
merged 1 commit into from
Oct 29, 2021

Conversation

MatthewKennedy
Copy link
Contributor

@MatthewKennedy MatthewKennedy commented Oct 29, 2021

  • Allow params :password and :password_confirmation.
  • Document passing request body with attributes nested inside user object.
  • Small changes for swagger docs validations.

@viezly
Copy link

viezly bot commented Oct 29, 2021

Changes preview:

Legend:

👀 Review pull request on Viezly

@MatthewKennedy
Copy link
Contributor Author

@damianlegawiec
A couple of thoughts regarding the swagger docs schemas:

  1. We should really update all of the request schemas in swagger_halper.rb to show being passed nested inside a json object with the key pertaining to the resource intended.
  2. We should also allow the optional use of a separate request body params schema for create and update, this is because params marked as required are not required for the update most of the time, and some resources (those with single table inheritance using a type), the attributes to update the fields on the type are not available until after the create and the type is defined.

@damianlegawiec
Copy link
Member

@damianlegawiec A couple of thoughts regarding the swagger docs schemas:

  1. We should really update all of the request schemas in swagger_halper.rb to show being passed nested inside a json object with the key pertaining to the resource intended.
  2. We should also allow the optional use of a separate request body params schema for create and update, this is because params marked as required are not required for the update most of the time, and some resources (those with single table inheritance using a type), the attributes to update the fields on the type are not available until after the create and the type is defined.

Aggree & Agree!

@damianlegawiec damianlegawiec merged commit 557ebb4 into main Oct 29, 2021
@delete-merged-branch delete-merged-branch bot deleted the fix/platform-api-user branch October 29, 2021 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants