mirror of https://github.com/apache/nifi.git
NIFI-4801 Fixes Swagger spec for uploadTemplate. This closes #2428
This commit is contained in:
parent
37271e8241
commit
c4e2ac7cda
|
@ -23,7 +23,7 @@ import javax.xml.bind.annotation.XmlRootElement;
|
||||||
/**
|
/**
|
||||||
* A serialized representation of this class can be placed in the entity body of a request to the API.
|
* A serialized representation of this class can be placed in the entity body of a request to the API.
|
||||||
*/
|
*/
|
||||||
@XmlRootElement(name = "copySnippetRequestEntity")
|
@XmlRootElement(name = "createTemplateRequestEntity")
|
||||||
public class CreateTemplateRequestEntity extends Entity {
|
public class CreateTemplateRequestEntity extends Entity {
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
package org.apache.nifi.web.api;
|
package org.apache.nifi.web.api;
|
||||||
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.annotations.ApiParam;
|
import io.swagger.annotations.ApiParam;
|
||||||
import io.swagger.annotations.ApiResponse;
|
import io.swagger.annotations.ApiResponse;
|
||||||
|
@ -3351,6 +3353,16 @@ public class ProcessGroupResource extends ApplicationResource {
|
||||||
@Authorization(value = "Write - /process-groups/{uuid}")
|
@Authorization(value = "Write - /process-groups/{uuid}")
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ApiImplicitParams(
|
||||||
|
value = {
|
||||||
|
@ApiImplicitParam(
|
||||||
|
name = "template",
|
||||||
|
value = "The binary content of the template file being uploaded.",
|
||||||
|
required = true,
|
||||||
|
type = "file",
|
||||||
|
paramType = "formData")
|
||||||
|
}
|
||||||
|
)
|
||||||
@ApiResponses(
|
@ApiResponses(
|
||||||
value = {
|
value = {
|
||||||
@ApiResponse(code = 400, message = "NiFi was unable to complete the request because it was invalid. The request should not be retried without modification."),
|
@ApiResponse(code = 400, message = "NiFi was unable to complete the request because it was invalid. The request should not be retried without modification."),
|
||||||
|
|
Loading…
Reference in New Issue