blob: 175692f659de6ae57ea61901551dfc00f25a8ab8 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ResourceSwagger (Apache Juneau 8.1.3)</title>
<link rel="stylesheet" type="text/css" href="../../../../../javadoc.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="ResourceSwagger (Apache Juneau 8.1.3)";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/juneau/rest/annotation/Property.html" title="annotation in org.apache.juneau.rest.annotation"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/juneau/rest/annotation/Rest.html" title="annotation in org.apache.juneau.rest.annotation"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/juneau/rest/annotation/ResourceSwagger.html" target="_top">Frames</a></li>
<li><a href="ResourceSwagger.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Required&nbsp;|&nbsp;</li>
<li><a href="#annotation.type.optional.element.summary">Optional</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#annotation.type.element.detail">Element</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.juneau.rest.annotation</div>
<h2 title="Annotation Type ResourceSwagger" class="title">Annotation Type ResourceSwagger</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public @interface <a href="../../../../../src-html/org/apache/juneau/rest/annotation/ResourceSwagger.html#line.25">ResourceSwagger</a></pre>
<div class="block">Extended annotation for <a href="../../../../../org/apache/juneau/rest/annotation/Rest.html#swagger--"><code>@Rest(swagger)</code></a>.
<ul class='seealso'>
<li class='link'><a class='doclink' href='../../../../../overview-summary.html#juneau-rest-server.Swagger'>Overview &gt; juneau-rest-server &gt; Swagger</a>
</ul></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="annotation.type.optional.element.summary">
<!-- -->
</a>
<h3>Optional Element Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Optional Element Summary table, listing optional elements, and an explanation">
<caption><span>Optional Elements</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Optional Element and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/juneau/http/annotation/Contact.html" title="annotation in org.apache.juneau.http.annotation">Contact</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/annotation/ResourceSwagger.html#contact--">contact</a></span></code>
<div class="block">Defines the swagger field <c>/info/contact</c>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/annotation/ResourceSwagger.html#description--">description</a></span></code>
<div class="block">Defines the swagger field <c>/info/description</c>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/juneau/jsonschema/annotation/ExternalDocs.html" title="annotation in org.apache.juneau.jsonschema.annotation">ExternalDocs</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/annotation/ResourceSwagger.html#externalDocs--">externalDocs</a></span></code>
<div class="block">Defines the swagger field <c>/externalDocs</c>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/juneau/http/annotation/License.html" title="annotation in org.apache.juneau.http.annotation">License</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/annotation/ResourceSwagger.html#license--">license</a></span></code>
<div class="block">Defines the swagger field <c>/info/license</c>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/juneau/http/annotation/Tag.html" title="annotation in org.apache.juneau.http.annotation">Tag</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/annotation/ResourceSwagger.html#tags--">tags</a></span></code>
<div class="block">Defines the swagger field <c>/tags</c>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/annotation/ResourceSwagger.html#termsOfService--">termsOfService</a></span></code>
<div class="block">Defines the swagger field <c>/info/termsOfService</c>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/annotation/ResourceSwagger.html#title--">title</a></span></code>
<div class="block">Defines the swagger field <c>/info/title</c>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/annotation/ResourceSwagger.html#value--">value</a></span></code>
<div class="block">Free-form value for the swagger of a resource.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/rest/annotation/ResourceSwagger.html#version--">version</a></span></code>
<div class="block">Defines the swagger field <c>/info/version</c>.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="annotation.type.element.detail">
<!-- -->
</a>
<h3>Element Detail</h3>
<a name="title--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>title</h4>
<pre>public abstract&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;<a href="../../../../../src-html/org/apache/juneau/rest/annotation/ResourceSwagger.html#line.57">title</a></pre>
<div class="block">Defines the swagger field <c>/info/title</c>.
<h5 class='section'>Example:</h5>
<p class='bcode w800'>
<ja>@Rest</ja>(
swagger=<ja>@ResourceSwagger</ja>(
title=<js>"Petstore application"</js>
)
)
</p>
<ul class='notes'>
<li>
The format is plain-text.
<br>Multiple lines are concatenated with newlines.
<li>
The precedence of lookup for this field is:
<ol>
<li><c>{resource-class}.title</c> property in resource bundle.
<li><a href="../../../../../org/apache/juneau/rest/annotation/ResourceSwagger.html#title--"><code>title()</code></a> on this class, then any parent classes.
<li>Value defined in Swagger JSON file.
<li><a href="../../../../../org/apache/juneau/rest/annotation/Rest.html#title--"><code>Rest.title()</code></a> on this class, then any parent classes.
</ol>
<li>
Supports <a class='doclink' href='../../../../../overview-summary.html#DefaultRestSvlVariables'>Default REST SVL Variables</a>
(e.g. <js>"$L{my.localized.variable}"</js>).
</ul></div>
<dl>
<dt>Default:</dt>
<dd>{}</dd>
</dl>
</li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="description--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>description</h4>
<pre>public abstract&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;<a href="../../../../../src-html/org/apache/juneau/rest/annotation/ResourceSwagger.html#line.91">description</a></pre>
<div class="block">Defines the swagger field <c>/info/description</c>.
<h5 class='section'>Example:</h5>
<p class='bcode w800'>
<ja>@Rest</ja>(
swagger=<ja>@ResourceSwagger</ja>(
description={
<js>"This is a sample server Petstore server based on the Petstore sample at Swagger.io."</js>,
<js>"You can find out more about Swagger at &lt;a class='link' href='http://swagger.io'&gt;http://swagger.io&lt;/a&gt;."</js>
}
)
)
</p>
<ul class='notes'>
<li>
The format is plain text.
<br>Multiple lines are concatenated with newlines.
<li>
The precedence of lookup for this field is:
<ol>
<li><c>{resource-class}.description</c> property in resource bundle.
<li><a href="../../../../../org/apache/juneau/rest/annotation/ResourceSwagger.html#description--"><code>description()</code></a> on this class, then any parent classes.
<li>Value defined in Swagger JSON file.
<li><a href="../../../../../org/apache/juneau/rest/annotation/Rest.html#description--"><code>Rest.description()</code></a> on this class, then any parent classes.
</ol>
<li>
Supports <a class='doclink' href='../../../../../overview-summary.html#DefaultRestSvlVariables'>Default REST SVL Variables</a>
(e.g. <js>"$L{my.localized.variable}"</js>).
</ul></div>
<dl>
<dt>Default:</dt>
<dd>{}</dd>
</dl>
</li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="contact--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>contact</h4>
<pre>public abstract&nbsp;<a href="../../../../../org/apache/juneau/http/annotation/Contact.html" title="annotation in org.apache.juneau.http.annotation">Contact</a>&nbsp;<a href="../../../../../src-html/org/apache/juneau/rest/annotation/ResourceSwagger.html#line.129">contact</a></pre>
<div class="block">Defines the swagger field <c>/info/contact</c>.
<p>
A <a class='doclink' href='../../../../../overview-summary.html#juneau-marshall.JsonDetails.SimplifiedJson'>Simple JSON</a> string with the following fields:
<p class='bcode w800'>
{
name: string,
url: string,
email: string
}
</p>
<p>
The default value pulls the description from the <c>contact</c> entry in the servlet resource bundle.
(e.g. <js>"contact = {name:'John Smith',email:'john.smith@foo.bar'}"</js> or
<js>"MyServlet.contact = {name:'John Smith',email:'john.smith@foo.bar'}"</js>).
<h5 class='section'>Example:</h5>
<p class='bcode w800'>
<ja>@Rest</ja>(
swagger=<ja>@MethodSwagger</ja>(
contact=<js>"{name:'John Smith',email:'john.smith@foo.bar'}"</js>
)
)
</p>
<ul class='notes'>
<li>
The format is a <a class='doclink' href='../../../../../overview-summary.html#juneau-marshall.JsonDetails.SimplifiedJson'>Simple JSON</a> object.
<br>Multiple lines are concatenated with newlines.
<li>
Supports <a class='doclink' href='../../../../../overview-summary.html#DefaultRestSvlVariables'>Default REST SVL Variables</a>
(e.g. <js>"$L{my.localized.variable}"</js>).
</ul></div>
<dl>
<dt>Default:</dt>
<dd>@org.apache.juneau.http.annotation.Contact</dd>
</dl>
</li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="externalDocs--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>externalDocs</h4>
<pre>public abstract&nbsp;<a href="../../../../../org/apache/juneau/jsonschema/annotation/ExternalDocs.html" title="annotation in org.apache.juneau.jsonschema.annotation">ExternalDocs</a>&nbsp;<a href="../../../../../src-html/org/apache/juneau/rest/annotation/ResourceSwagger.html#line.151">externalDocs</a></pre>
<div class="block">Defines the swagger field <c>/externalDocs</c>.
<p>
It is used to populate the Swagger external documentation field and to display on HTML pages.
*
<p>
The default value pulls the description from the <c>externalDocs</c> entry in the servlet resource bundle.
(e.g. <js>"externalDocs = {url:'http://juneau.apache.org'}"</js> or
<js>"MyServlet.externalDocs = {url:'http://juneau.apache.org'}"</js>).
<h5 class='section'>Example:</h5>
<p class='bcode w800'>
<ja>@Rest</ja>(
swagger=<ja>@MethodSwagger</ja>(
externalDocs=<ja>@ExternalDocs</ja>(url=<js>"http://juneau.apache.org"</js>)
)
)
</p></div>
<dl>
<dt>Default:</dt>
<dd>@org.apache.juneau.jsonschema.annotation.ExternalDocs</dd>
</dl>
</li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="license--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>license</h4>
<pre>public abstract&nbsp;<a href="../../../../../org/apache/juneau/http/annotation/License.html" title="annotation in org.apache.juneau.http.annotation">License</a>&nbsp;<a href="../../../../../src-html/org/apache/juneau/rest/annotation/ResourceSwagger.html#line.191">license</a></pre>
<div class="block">Defines the swagger field <c>/info/license</c>.
<p>
It is used to populate the Swagger license field and to display on HTML pages.
<p>
A <a class='doclink' href='../../../../../overview-summary.html#juneau-marshall.JsonDetails.SimplifiedJson'>Simple JSON</a> string with the following fields:
<p class='bcode w800'>
{
name: string,
url: string
}
</p>
<p>
The default value pulls the description from the <c>license</c> entry in the servlet resource bundle.
(e.g. <js>"license = {name:'Apache 2.0',url:'http://www.apache.org/licenses/LICENSE-2.0.html'}"</js> or
<js>"MyServlet.license = {name:'Apache 2.0',url:'http://www.apache.org/licenses/LICENSE-2.0.html'}"</js>).
<h5 class='section'>Example:</h5>
<p class='bcode w800'>
<ja>@Rest</ja>(
swagger=<ja>@MethodSwagger</ja>(
license=<js>"{name:'Apache 2.0',url:'http://www.apache.org/licenses/LICENSE-2.0.html'}"</js>
)
)
</p>
<ul class='notes'>
<li>
The format is a <a class='doclink' href='../../../../../overview-summary.html#juneau-marshall.JsonDetails.SimplifiedJson'>Simple JSON</a> object.
<br>Multiple lines are concatenated with newlines.
<li>
Supports <a class='doclink' href='../../../../../overview-summary.html#DefaultRestSvlVariables'>Default REST SVL Variables</a>
(e.g. <js>"$L{my.localized.variable}"</js>).
</ul></div>
<dl>
<dt>Default:</dt>
<dd>@org.apache.juneau.http.annotation.License</dd>
</dl>
</li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="tags--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>tags</h4>
<pre>public abstract&nbsp;<a href="../../../../../org/apache/juneau/http/annotation/Tag.html" title="annotation in org.apache.juneau.http.annotation">Tag</a>[]&nbsp;<a href="../../../../../src-html/org/apache/juneau/rest/annotation/ResourceSwagger.html#line.240">tags</a></pre>
<div class="block">Defines the swagger field <c>/tags</c>.
Optional tagging information for the exposed API.
<p>
It is used to populate the Swagger tags field and to display on HTML pages.
<p>
A <a class='doclink' href='../../../../../overview-summary.html#juneau-marshall.JsonDetails.SimplifiedJson'>Simple JSON</a> string with the following fields:
<p class='bcode w800'>
[
{
name: string,
description: string,
externalDocs: {
description: string,
url: string
}
}
]
</p>
<p>
The default value pulls the description from the <c>tags</c> entry in the servlet resource bundle.
(e.g. <js>"tags = [{name:'Foo',description:'Foobar'}]"</js> or
<js>"MyServlet.tags = [{name:'Foo',description:'Foobar'}]"</js>).
<h5 class='section'>Example:</h5>
<p class='bcode w800'>
<ja>@Rest</ja>(
swagger=<ja>@MethodSwagger</ja>(
tags=<js>"[{name:'Foo',description:'Foobar'}]"</js>
)
)
</p>
<ul class='notes'>
<li>
The format is a <a class='doclink' href='../../../../../overview-summary.html#juneau-marshall.JsonDetails.SimplifiedJson'>Simple JSON</a> array.
<br>Multiple lines are concatenated with newlines.
<li>
Supports <a class='doclink' href='../../../../../overview-summary.html#DefaultRestSvlVariables'>Default REST SVL Variables</a>
(e.g. <js>"$L{my.localized.variable}"</js>).
</ul></div>
<dl>
<dt>Default:</dt>
<dd>{}</dd>
</dl>
</li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="termsOfService--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>termsOfService</h4>
<pre>public abstract&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;<a href="../../../../../src-html/org/apache/juneau/rest/annotation/ResourceSwagger.html#line.264">termsOfService</a></pre>
<div class="block">Defines the swagger field <c>/info/termsOfService</c>.
Optional servlet terms-of-service for this API.
<p>
It is used to populate the Swagger terms-of-service field.
<p>
The default value pulls the description from the <c>termsOfService</c> entry in the servlet resource bundle.
(e.g. <js>"termsOfService = foo"</js> or <js>"MyServlet.termsOfService = foo"</js>).
<ul class='notes'>
<li>
The format is plain text.
<br>Multiple lines are concatenated with newlines.
<li>
Supports <a class='doclink' href='../../../../../overview-summary.html#DefaultRestSvlVariables'>Default REST SVL Variables</a>
(e.g. <js>"$L{my.localized.variable}"</js>).
</ul></div>
<dl>
<dt>Default:</dt>
<dd>{}</dd>
</dl>
</li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="version--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>version</h4>
<pre>public abstract&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../../src-html/org/apache/juneau/rest/annotation/ResourceSwagger.html#line.288">version</a></pre>
<div class="block">Defines the swagger field <c>/info/version</c>.
Provides the version of the application API (not to be confused with the specification version).
<p>
It is used to populate the Swagger version field and to display on HTML pages.
<p>
The default value pulls the description from the <c>version</c> entry in the servlet resource bundle.
(e.g. <js>"version = 2.0"</js> or <js>"MyServlet.version = 2.0"</js>).
<ul class='notes'>
<li>
The format is plain text.
<li>
Supports <a class='doclink' href='../../../../../overview-summary.html#DefaultRestSvlVariables'>Default REST SVL Variables</a>
(e.g. <js>"$L{my.localized.variable}"</js>).
</ul></div>
<dl>
<dt>Default:</dt>
<dd>""</dd>
</dl>
</li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="value--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>value</h4>
<pre>public abstract&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;<a href="../../../../../src-html/org/apache/juneau/rest/annotation/ResourceSwagger.html#line.402">value</a></pre>
<div class="block">Free-form value for the swagger of a resource.
<p>
This is a <a class='doclink' href='../../../../../overview-summary.html#juneau-marshall.JsonDetails.SimplifiedJson'>Simple JSON</a> object that makes up the swagger information for this resource.
<p>
The following are completely equivalent ways of defining the swagger description of a resource:
<p class='bcode w800'>
<jc>// Normal</jc>
<ja>@Rest</ja>(
swagger=<ja>@ResourceSwagger</ja>(
title=<js>"Petstore application"</js>,
description={
<js>"This is a sample server Petstore server based on the Petstore sample at Swagger.io."</js>,
<js>"You can find out more about Swagger at &lt;a class='link' href='http://swagger.io'&gt;http://swagger.io&lt;/a&gt;."</js>
},
contact=<ja>@Contact</ja>(
name=<js>"John Smith"</js>,
email=<js>"john@smith.com"</js>
),
license=<ja>@License</ja>(
name=<js>"Apache 2.0"</js>,
url=<js>"http://www.apache.org/licenses/LICENSE-2.0.html"</js>
),
version=<js>"2.0"</js>,
termsOfService=<js>"You are on your own."</js>,
tags={
<ja>@Tag</ja>(
name=<js>"Java"</js>,
description=<js>"Java utility"</js>,
externalDocs=<ja>@ExternalDocs</ja>(
description=<js>"Home page"</js>,
url=<js>"http://juneau.apache.org"</js>
)
}
},
externalDocs=<ja>@ExternalDocs</ja>(
description=<js>"Home page"</js>,
url=<js>"http://juneau.apache.org"</js>
)
)
)
</p>
<p class='bcode w800'>
<jc>// Free-form</jc>
<ja>@Rest</ja>(
swagger=@ResourceSwagger({
<js>"title: 'Petstore application',"</js>,
<js>"description: 'This is a sample server Petstore server based on the Petstore sample at Swagger.io.\nYou can find out more about Swagger at &lt;a class='link' href='http://swagger.io'&gt;http://swagger.io&lt;/a&gt;.',"</js>,
<js>"contact:{"</js>,
<js>"name: 'John Smith',"</js>,
<js>"email: 'john@smith.com'"</js>,
<js>"},"</js>,
<js>"license:{"</js>,
<js>"name: 'Apache 2.0',"</js>,
<js>"url: 'http://www.apache.org/licenses/LICENSE-2.0.html'"</js>,
<js>"},"</js>,
<js>"version: '2.0',"</js>,
<js>"termsOfService: 'You are on your own.',"</js>,
<js>"tags:["</js>,
<js>"{"</js>,
<js>"name: 'Java',"</js>,
<js>"description: 'Java utility',"</js>,
<js>"externalDocs:{"</js>,
<js>"description: 'Home page',"</js>,
<js>"url: 'http://juneau.apache.org'"</js>,
<js>"}"</js>,
<js>"}"</js>,
<js>"],"</js>,
<js>"externalDocs:{"</js>,
<js>"description: 'Home page',"</js>,
<js>"url: 'http://juneau.apache.org'"</js>,
<js>"}"</js>
})
)
</p>
<p class='bcode w800'>
<jc>// Free-form with variables</jc>
<ja>@Rest</ja>(
swagger=@ResourceSwagger(<js>"$F{MyResourceSwagger.json}"</js>)
)
</p>
<p>
The reasons why you may want to use this field include:
<ul>
<li>You want to pull in the entire Swagger JSON definition for this body from an external source such as a properties file.
<li>You want to add extra fields to the Swagger documentation that are not officially part of the Swagger specification.
</ul>
<ul class='notes'>
<li>
The format is a <a class='doclink' href='../../../../../overview-summary.html#juneau-marshall.JsonDetails.SimplifiedJson'>Simple JSON</a> object.
<li>
The leading/trailing <c>{ }</c> characters are optional.
<br>The following two example are considered equivalent:
<p class='bcode w800'>
<ja>@ResourceSwagger</ja>(<js>"{title:'Petstore application'}"</js>)
</p>
<p class='bcode w800'>
<ja>@ResourceSwagger</ja>(<js>"title:'Petstore application'"</js>)
</p>
<li>
Multiple lines are concatenated with newlines so that you can format the value to be readable.
<li>
Supports <a class='doclink' href='../../../../../overview-summary.html#DefaultRestSvlVariables'>Default REST SVL Variables</a>
(e.g. <js>"$L{my.localized.variable}"</js>).
<li>
Values defined in this field supersede values pulled from the Swagger JSON file and are superseded by individual values defined on this annotation.
</ul></div>
<dl>
<dt>Default:</dt>
<dd>{}</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/juneau/rest/annotation/Property.html" title="annotation in org.apache.juneau.rest.annotation"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/juneau/rest/annotation/Rest.html" title="annotation in org.apache.juneau.rest.annotation"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/juneau/rest/annotation/ResourceSwagger.html" target="_top">Frames</a></li>
<li><a href="ResourceSwagger.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Required&nbsp;|&nbsp;</li>
<li><a href="#annotation.type.optional.element.summary">Optional</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#annotation.type.element.detail">Element</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2016&#x2013;2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>