Example usage for org.springframework.restdocs.constraints ConstraintDescriptions ConstraintDescriptions

List of usage examples for org.springframework.restdocs.constraints ConstraintDescriptions ConstraintDescriptions

Introduction

In this page you can find the example usage for org.springframework.restdocs.constraints ConstraintDescriptions ConstraintDescriptions.

Prototype

public ConstraintDescriptions(Class<?> clazz) 

Source Link

Document

Create a new ConstraintDescriptions for the given clazz .

Usage

From source file:com.example.Constraints.java

@SuppressWarnings("unused")
// tag::constraints[]
public void example() {
    ConstraintDescriptions userConstraints = new ConstraintDescriptions(UserInput.class); // <1>
    List<String> descriptions = userConstraints.descriptionsForProperty("name"); // <2>
}

From source file:io.pivotal.strepsirrhini.chaosloris.docs.ConstrainedFields.java

ConstrainedFields(Class<?> input) {
    this.constraintDescriptions = new ConstraintDescriptions(input);
}