Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
inc-validator/src/main/java/uk/org/iay/incommon/validator/api/ValidatorsApi.java
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
52 lines (43 sloc)
2.87 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* NOTE: This class is auto generated by the swagger code generator program (2.3.1). | |
* https://github.com/swagger-api/swagger-codegen | |
* Do not edit the class manually. | |
* | |
* **IAY**: The only changes here from the generated file have been to clean up the imports | |
* list and to add "throws ApiException" to the validate method. | |
*/ | |
package uk.org.iay.incommon.validator.api; | |
import java.util.List; | |
import javax.validation.Valid; | |
import org.springframework.http.ResponseEntity; | |
import org.springframework.web.bind.annotation.PathVariable; | |
import org.springframework.web.bind.annotation.RequestBody; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import org.springframework.web.bind.annotation.RequestMethod; | |
import io.swagger.annotations.Api; | |
import io.swagger.annotations.ApiOperation; | |
import io.swagger.annotations.ApiParam; | |
import io.swagger.annotations.ApiResponse; | |
import io.swagger.annotations.ApiResponses; | |
import uk.org.iay.incommon.validator.models.Status; | |
import uk.org.iay.incommon.validator.models.Validator; | |
@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2018-05-12T13:33:10.546+01:00") | |
@Api(value = "validators", description = "the validators API") | |
public interface ValidatorsApi { | |
@ApiOperation(value = "lists available validators", nickname = "getValidators", notes = "Lists all of the available validator pipelines. ", response = Validator.class, responseContainer = "List", tags={ "validation", }) | |
@ApiResponses(value = { | |
@ApiResponse(code = 200, message = "list of validator identifiers and descriptions", response = Validator.class, responseContainer = "List") }) | |
@RequestMapping(value = "/validators", | |
produces = { "application/json" }, | |
method = RequestMethod.GET) | |
ResponseEntity<List<Validator>> getValidators(); | |
@ApiOperation(value = "performs a validation", nickname = "validate", notes = "", response = Status.class, responseContainer = "List", tags={ "validation", }) | |
@ApiResponses(value = { | |
@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") }) | |
@RequestMapping(value = "/validators/{validator_id}/validate", | |
produces = { "application/json" }, | |
consumes = { "application/xml+samlmetadata" }, | |
method = RequestMethod.POST) | |
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) | |
throws ApiException; | |
} |