Closed lindgrenj6 closed 4 years ago
cc @syncrou @mkanoor
Yeah this probably won't work for those services, it's going to need to be a separate method. writeOnce
would really fix everything here - but the closest thing to the spec is writeOnly
which is definitely not what we want!
After discussing with @syncrou and @mkanoor, I'm going to move the logic I have here into a separate function or add a parameter to params_for_create
to return write-only params so we can use that in catalog.
@bdunne updated so it won't break sources/topology. This way anyone who wants to have POST requests validate against any read-only parameters this will do it.
https://projects.engineering.redhat.com/browse/SSP-927
Found a bug when investigating this, basically in the
params_for_create
method before we were just allowing all the fields to come through whether they were readOnly or not.params_for_update
did the right thing, butparams_for_create
was a bit more complicated since the requstBody can come in as a different ref with different fields.This PR enhances the
params_for_create
function in the ParameterMixin so that it checks for any readOnly parameters as well as the requestBody schema if passing in:writeable => true
when callingparams_for_create
.