NIFI-4801 Fixes Swagger spec for uploadTemplate. This closes #2428

This commit is contained in:
Kevin Doran 2018-01-23 09:59:58 -05:00 committed by Matt Gilman
parent 37271e8241
commit c4e2ac7cda
No known key found for this signature in database
GPG Key ID: DF61EC19432AEE37
2 changed files with 13 additions and 1 deletions

View File

@ -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.
*/
@XmlRootElement(name = "copySnippetRequestEntity")
@XmlRootElement(name = "createTemplateRequestEntity")
public class CreateTemplateRequestEntity extends Entity {
private String name;

View File

@ -17,6 +17,8 @@
package org.apache.nifi.web.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.ApiParam;
import io.swagger.annotations.ApiResponse;
@ -3351,6 +3353,16 @@ public class ProcessGroupResource extends ApplicationResource {
@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(
value = {
@ApiResponse(code = 400, message = "NiFi was unable to complete the request because it was invalid. The request should not be retried without modification."),