Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ public void handleRequest(final InputStream inputStream, final OutputStream outp
this.lambdaLogger = context.getLogger();
ProgressEvent<ResourceT, CallbackT> handlerResponse = null;
HandlerRequest<ResourceT, CallbackT> request = null;
String bearerToken = null;
scrubFiles();
try {
if (inputStream == null) {
Expand Down Expand Up @@ -374,7 +373,13 @@ private void writeResponse(final OutputStream outputStream, final ProgressEvent<
ResourceT model = response.getResourceModel();
if (model != null) {
JSONObject modelObject = new JSONObject(this.serializer.serialize(model));
ResourceTypeSchema.load(provideResourceSchemaJSONObject()).removeWriteOnlyProperties(modelObject);

// strip write only properties on final results, we will need the intact model
// while provisioning
if (response.getStatus() != OperationStatus.IN_PROGRESS) {
ResourceTypeSchema.load(provideResourceSchemaJSONObject()).removeWriteOnlyProperties(modelObject);
}

ResourceT sanitizedModel = this.serializer.deserializeStrict(modelObject.toString(), getModelTypeReference());

response.setResourceModel(sanitizedModel);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,6 @@ public void invokeHandler_CompleteSynchronously_returnsSuccess(final String requ

@Test
public void invokeHandler_DependenciesInitialised_CompleteSynchronously_returnsSuccess() throws IOException {
final Action action = Action.CREATE;
final WrapperOverride wrapper = new WrapperOverride();
final TestModel model = new TestModel();

Expand Down