@Rest(path="/jsonSchema", messages="nls/JsonSchemaResource", title="Sample JSON-Schema document", description="Sample resource that shows how to generate JSON-Schema documents", swagger=) @HtmlDocConfig(widgets={ContentTypeMenuItem.class,ThemeMenuItem.class}, navlinks={"up: request:/..","options: servlet:/?method=OPTIONS","$W{ContentTypeMenuItem}","$W{ThemeMenuItem}","source: $C{Source/gitHub}/org/apache/juneau/examples/rest/dto/$R{servletClassSimple}.java"}, aside={"<div style=\'min-width:200px\' class=\'text\'>","\t<p>Shows how to produce JSON-Schema documents in a variety of languages using the JSON-Schema DTOs.</p>","</div>"}) @BeanConfig(examples="Schema: $F{JsonSchemaResource_example.json}") public class JsonSchemaResource extends BasicRestServletJena
| Constructor and Description |
|---|
JsonSchemaResource() |
| Modifier and Type | Method and Description |
|---|---|
JsonSchema |
get()
Get the JSON-Schema document.
|
void |
init() |
JsonSchema |
put(JsonSchema schema)
Overwrite the JSON-Schema document
|
getOptionsdestroy, getContext, getPath, getProperties, getRequest, getResponse, getServletConfig, init, log, log, log, log, logObjects, service, setContext, setRestResourceResolverdoDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, servicegetInitParameter, getInitParameterNames, getServletContext, getServletInfo, getServletNamepublic JsonSchemaResource()
public void init()
init in class GenericServlet@RestMethod(summary="Get the JSON-Schema document") public JsonSchema get()
@RestMethod(summary="Overwrite the JSON-Schema document", description="Replaces the schema document with the specified content, and then mirrors it as the response.") public JsonSchema put(@Body JsonSchema schema)
schema - The new schema document.Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.