You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 19, 2023. It is now read-only.
<p>The generated documentation can be viewed for the
896
+
<ahref="https://htmlpreview.github.io/?https://github.com/ScaCap/spring-auto-restdocs/blob/master/samples/java-webmvc/generated-docs/index.html">Java Web MVC example</a>,
<ahref="https://htmlpreview.github.io/?https://github.com/ScaCap/spring-auto-restdocs/blob/master/samples/kotlin-webmvc/generated-docs/index.html">Kotlin Web MCV example</a>.</p>
<p>Provide your own template in <code>org/springframework/restdocs/templates/asciidoctor</code> (or <code>markdown</code>) package of your resources.
1525
-
You can override <ahref="https://github.com/spring-projects/spring-restdocs/tree/v2.0.2.RELEASE/spring-restdocs-core/src/main/resources/org/springframework/restdocs/templates">REST Docs
1526
-
templates</a>
1560
+
You can override <ahref="https://github.com/spring-projects/spring-restdocs/tree/v2.0.2.RELEASE/spring-restdocs-core/src/main/resources/org/springframework/restdocs/templates">REST Docs templates</a>
1527
1561
and <ahref="https://github.com/ScaCap/spring-auto-restdocs/tree/master/spring-auto-restdocs-core/src/main/resources/org/springframework/restdocs/templates">Auto REST Docs templates</a>.
1528
1562
Important is to omit <code>default-</code> part from the template name so that the resolution algorithm will prefer this custom template.
1529
-
See also <ahref="http://docs.spring.io/spring-restdocs/docs/2.0.2.RELEASE/reference/html5/#documenting-your-api-customizing-snippets">original documentation</a> for additional details.</p>
1563
+
See also <ahref="http://docs.spring.io/spring-restdocs/docs/2.0.2.RELEASE/reference/html5/#documenting-your-api-customizing-snippets">original documentation</a> for additional details.</p>
<h3id="constraints-optionality"><aclass="link" href="#constraints-optionality">Constraint that determine optionality</a></h3>
1616
+
<h3id="constraints-optionality"><aclass="link" href="#constraints-optionality">Constraints that determine optionality</a></h3>
1583
1617
<divclass="paragraph">
1584
1618
<p>The following three constraints are used to determine whether a field is optional.
1585
1619
Their descriptions are not included in the field descriptions.</p>
1586
1620
</div>
1587
1621
<divclass="ulist">
1588
1622
<ul>
1589
1623
<li>
1590
-
<p>NotNull (Bean Validation)</p>
1624
+
<p>NotNull</p>
1625
+
</li>
1626
+
<li>
1627
+
<p>NotEmpty</p>
1628
+
</li>
1629
+
<li>
1630
+
<p>NotBlank</p>
1631
+
</li>
1632
+
</ul>
1633
+
</div>
1634
+
<divclass="paragraph">
1635
+
<p>Along with JSR-303 annotations, optionality is also determined based on:</p>
1636
+
</div>
1637
+
<divclass="ulist">
1638
+
<ul>
1639
+
<li>
1640
+
<p><code>required</code> parameter of <code>@RequestParam</code></p>
1591
1641
</li>
1592
1642
<li>
1593
-
<p>NotEmpty (Hibernate Validator)</p>
1643
+
<p>field type being <code>java.util.Optional</code></p>
1594
1644
</li>
1595
1645
<li>
1596
-
<p>NotBlank (Hibernate Validator)</p>
1646
+
<p>Koltin field being non-nullable</p>
1597
1647
</li>
1598
1648
</ul>
1599
1649
</div>
@@ -1606,7 +1656,7 @@ <h3 id="constraints-custom"><a class="link" href="#constraints-custom">Custom co
1606
1656
Each description is a property where the key is the full class name of the annotation suffixed with <code>.description</code>.
1607
1657
The value is the description and can contain placeholders for annotation methods,
1608
1658
e.g. <code>${value}</code> to get the content of <code>value()</code>.
1609
-
For more details, see original documentation of <ahref="http://docs.spring.io/spring-restdocs/docs/2.0.2.RELEASE/reference/html5/#documenting-your-api-constraints-describing">here</a>.</p>
1659
+
For more details, see original documentation of <ahref="http://docs.spring.io/spring-restdocs/docs/2.0.2.RELEASE/reference/html5/#documenting-your-api-constraints-describing">here</a>.</p>
1610
1660
</div>
1611
1661
<divclass="paragraph">
1612
1662
<p>Example for the constraint annotation <code>myproject.constraints.OneOf</code>:</p>
0 commit comments