|
| 1 | +/** |
| 2 | + * NOTE: This class is auto generated by the swagger code generator program (2.3.1). |
| 3 | + * https://github.com/swagger-api/swagger-codegen |
| 4 | + * Do not edit the class manually. |
| 5 | + * |
| 6 | + * **IAY**: The only changes here from the generated file have been to clean up the imports |
| 7 | + * list and to add "throws ApiException" to the validate method. |
| 8 | + */ |
| 9 | +package uk.org.iay.incommon.validator.api; |
| 10 | + |
| 11 | +import java.util.List; |
| 12 | + |
| 13 | +import javax.validation.Valid; |
| 14 | + |
| 15 | +import org.springframework.http.ResponseEntity; |
| 16 | +import org.springframework.web.bind.annotation.PathVariable; |
| 17 | +import org.springframework.web.bind.annotation.RequestBody; |
| 18 | +import org.springframework.web.bind.annotation.RequestMapping; |
| 19 | +import org.springframework.web.bind.annotation.RequestMethod; |
| 20 | + |
| 21 | +import io.swagger.annotations.Api; |
| 22 | +import io.swagger.annotations.ApiOperation; |
| 23 | +import io.swagger.annotations.ApiParam; |
| 24 | +import io.swagger.annotations.ApiResponse; |
| 25 | +import io.swagger.annotations.ApiResponses; |
| 26 | +import uk.org.iay.incommon.validator.models.Status; |
| 27 | +import uk.org.iay.incommon.validator.models.Validator; |
| 28 | +@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2018-05-12T13:33:10.546+01:00") |
| 29 | + |
| 30 | +@Api(value = "validators", description = "the validators API") |
| 31 | +public interface ValidatorsApi { |
| 32 | + |
| 33 | + @ApiOperation(value = "lists available validators", nickname = "getValidators", notes = "Lists all of the available validator pipelines. ", response = Validator.class, responseContainer = "List", tags={ "validation", }) |
| 34 | + @ApiResponses(value = { |
| 35 | + @ApiResponse(code = 200, message = "list of validator identifiers and descriptions", response = Validator.class, responseContainer = "List") }) |
| 36 | + @RequestMapping(value = "/validators", |
| 37 | + produces = { "application/json" }, |
| 38 | + method = RequestMethod.GET) |
| 39 | + ResponseEntity<List<Validator>> getValidators(); |
| 40 | + |
| 41 | + |
| 42 | + @ApiOperation(value = "performs a validation", nickname = "validate", notes = "", response = Status.class, responseContainer = "List", tags={ "validation", }) |
| 43 | + @ApiResponses(value = { |
| 44 | + @ApiResponse(code = 200, message = "The result of a validation operation is a (possibly empty) array of `Status` objects derived from the `StatusMetadata` instances attached to the item being validated. These may include errors, and it is up to the client to determine what constitues a \"pass\" or \"fail\". ", response = Status.class, responseContainer = "List") }) |
| 45 | + @RequestMapping(value = "/validators/{validator_id}/validate", |
| 46 | + produces = { "application/json" }, |
| 47 | + consumes = { "application/xml+samlmetadata" }, |
| 48 | + method = RequestMethod.POST) |
| 49 | + ResponseEntity<List<Status>> validate(@ApiParam(value = "An identifier for the validation to be performed. ",required=true) @PathVariable("validator_id") String validatorId,@ApiParam(value = "The metadata to be validated." ,required=true ) @Valid @RequestBody String metadata) |
| 50 | + throws ApiException; |
| 51 | + |
| 52 | +} |
0 commit comments