bossenti commented on code in PR #2566:
URL: https://github.com/apache/streampipes/pull/2566#discussion_r1526051395
##########
streampipes-platform-services/src/main/java/org/apache/streampipes/ps/PipelineElementTemplateResource.java:
##########
@@ -92,32 +95,35 @@ public ResponseEntity<?> getById(@Parameter(description =
"The id of the pipelin
@PostMapping(consumes = MediaType.APPLICATION_JSON_VALUE)
@Operation(summary = "Store a new pipeline element template",
- tags = {"Pipeline Element Templates"},
- responses = {
- @ApiResponse(responseCode = "200", description = "Template
successfully stored")
- })
+ tags = {"Pipeline Element Templates"},
+ responses = {
+ @ApiResponse(responseCode = "200", description = "Template
successfully stored")
+ })
public ResponseEntity<Void> create(
@RequestBody(description = "The pipeline element template to be stored",
- content = @Content(schema = @Schema(implementation =
PipelineElementTemplate.class)))
- @org.springframework.web.bind.annotation.RequestBody
PipelineElementTemplate entity) {
+ content = @Content(schema = @Schema(implementation =
PipelineElementTemplate.class)))
+ @org.springframework.web.bind.annotation.RequestBody
PipelineElementTemplate entity
Review Comment:
I know it has already been there, but could you place replace this by an
import statement? 🙂
##########
streampipes-platform-services/src/main/java/org/apache/streampipes/ps/PipelineElementTemplateResource.java:
##########
@@ -196,26 +204,27 @@ public ResponseEntity<DataProcessorInvocation>
getPipelineElementForTemplate(
@RequestParam("overwriteNames") String overwriteNameAndDescription,
@RequestBody(description = "The data processor invocation that should be
configured with the template contents",
- content = @Content(schema = @Schema(implementation =
DataProcessorInvocation.class)))
- @org.springframework.web.bind.annotation.RequestBody
DataProcessorInvocation invocation) {
+ content = @Content(schema = @Schema(implementation =
DataProcessorInvocation.class)))
+ @org.springframework.web.bind.annotation.RequestBody
DataProcessorInvocation invocation
Review Comment:
same as above
##########
streampipes-platform-services/src/main/java/org/apache/streampipes/ps/PipelineElementTemplateResource.java:
##########
@@ -149,44 +156,45 @@ public ResponseEntity<Void> delete(
produces = MediaType.APPLICATION_JSON_VALUE,
consumes = MediaType.APPLICATION_JSON_VALUE)
@Operation(summary = "Configure a data sink with a pipeline element
template.",
- tags = {"Pipeline Element Templates"},
- responses = {
- @ApiResponse(content = {
- @Content(
- mediaType = "application/json",
- schema = @Schema(implementation = DataSinkInvocation.class))
- }, responseCode = "200", description = "The configured data sink
invocation model"),
- })
+ tags = {"Pipeline Element Templates"},
+ responses = {
+ @ApiResponse(content = {
+ @Content(
+ mediaType = "application/json",
+ schema = @Schema(implementation =
DataSinkInvocation.class))
+ }, responseCode = "200", description = "The configured data
sink invocation model"),
+ })
public ResponseEntity<DataSinkInvocation> getPipelineElementForTemplate(
@Parameter(description = "The id of the pipeline element template",
required = true)
@PathVariable("id") String id,
@Parameter(
description = "Overwrite the name and description of the pipeline
element"
+ "with the labels given in the pipeline element template")
- @RequestParam("overwriteNames") String overwriteNameAndDescription,
-
+ @RequestParam(value = "overwriteNames", defaultValue = "false", required
= false)
+ String overwriteNameAndDescription,
@RequestBody(description = "The data sink invocation that should be
configured with the template contents",
- content = @Content(schema = @Schema(implementation =
DataSinkInvocation.class)))
- @org.springframework.web.bind.annotation.RequestBody DataSinkInvocation
invocation) {
+ content = @Content(schema = @Schema(implementation =
DataSinkInvocation.class)))
+ @org.springframework.web.bind.annotation.RequestBody DataSinkInvocation
invocation
Review Comment:
same as above
##########
streampipes-platform-services/src/main/java/org/apache/streampipes/ps/PipelineElementTemplateResource.java:
##########
@@ -225,8 +234,9 @@ public ResponseEntity<AdapterDescription>
getPipelineElementForTemplate(
@RequestParam("overwriteNames") String overwriteNameAndDescription,
@RequestBody(description = "The adapter that should be configured with
the template contents",
- content = @Content(schema = @Schema(implementation =
AdapterDescription.class)))
- @org.springframework.web.bind.annotation.RequestBody AdapterDescription
adapterDescription) {
+ content = @Content(schema = @Schema(implementation =
AdapterDescription.class)))
+ @org.springframework.web.bind.annotation.RequestBody AdapterDescription
adapterDescription
Review Comment:
same as above
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]