Class JsonSchemaResource
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.apache.juneau.rest.servlet.RestServlet
org.apache.juneau.rest.servlet.BasicRestServlet
org.apache.juneau.examples.rest.dto.JsonSchemaResource
- All Implemented Interfaces:
jakarta.servlet.Servlet
,jakarta.servlet.ServletConfig
,Serializable
,BasicUniversalConfig
,DefaultConfig
,DefaultHtmlConfig
,BasicRestOperations
@Marshalled(on="Schema",
example="$F{JsonSchemaResource_example.json}")
public class JsonSchemaResource
extends BasicRestServlet
Sample resource that shows how to serialize JSON-Schema documents.
See Also:
-
Field Summary
Fields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionget()
[HTTP GET /dto/jsonSchema] Get the JSON-Schema document.void
init()
put
(JsonSchema schema) [HTTP PUT /dto/jsonSchema] Overwrite the JSON-Schema documentMethods inherited from class org.apache.juneau.rest.servlet.BasicRestServlet
error, getFavIcon, getHtdoc, getStats, getSwagger
Methods inherited from class org.apache.juneau.rest.servlet.RestServlet
destroy, doLog, getContext, getPath, getRequest, getResponse, init, log, log, service, setContext
Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
Methods inherited from class jakarta.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, log, log
-
Constructor Details
-
JsonSchemaResource
public JsonSchemaResource()
-
-
Method Details
-
init
- Overrides:
init
in classjakarta.servlet.GenericServlet
-
get
[HTTP GET /dto/jsonSchema] Get the JSON-Schema document.- Returns:
- The JSON-Schema document.
-
put
[HTTP PUT /dto/jsonSchema] Overwrite the JSON-Schema document- Parameters:
schema
- The new schema document.- Returns:
- The updated schema document.
-