Skip to content

Commit

Permalink
fix: Response body for posting in submodel repository and submodel se…
Browse files Browse the repository at this point in the history
…rvice
  • Loading branch information
VivekHub97 committed Oct 29, 2024
1 parent 1995620 commit 7a0b4d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public ResponseEntity<SubmodelElement> postSubmodelElementByPathSubmodelRepo(Bas
@Override
public ResponseEntity<SubmodelElement> postSubmodelElementSubmodelRepo(Base64UrlEncodedIdentifier submodelIdentifier, @Valid SubmodelElement body) {
repository.createSubmodelElement(submodelIdentifier.getIdentifier(), body);
return new ResponseEntity<SubmodelElement>(HttpStatus.CREATED);
return new ResponseEntity<SubmodelElement>(body, HttpStatus.CREATED);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,15 +199,15 @@ public ResponseEntity<SubmodelElement> postSubmodelElement(@Parameter(in = Param
@Parameter(in = ParameterIn.QUERY, description = "Determines the structural depth of the respective resource content", schema = @Schema(allowableValues = { "deep",
"core" }, defaultValue = "deep")) @Valid @RequestParam(value = "level", required = false, defaultValue = "deep") String level) {
service.createSubmodelElement(body);
return new ResponseEntity<SubmodelElement>(HttpStatus.CREATED);
return new ResponseEntity<SubmodelElement>(body, HttpStatus.CREATED);
}

@Override
public ResponseEntity<SubmodelElement> postSubmodelElementByPath(
@Parameter(in = ParameterIn.PATH, description = "IdShort path to the submodel element (dot-separated)", required = true, schema = @Schema()) @PathVariable("idShortPath") String idShortPath,
@Parameter(in = ParameterIn.DEFAULT, description = "Requested submodel element", required = true, schema = @Schema()) @Valid @RequestBody SubmodelElement body) {
service.createSubmodelElement(idShortPath, body);
return new ResponseEntity<SubmodelElement>(HttpStatus.CREATED);
return new ResponseEntity<SubmodelElement>(body, HttpStatus.CREATED);
}

@Override
Expand Down

0 comments on commit 7a0b4d2

Please sign in to comment.