public class Documentation2JSONSchema
extends java.lang.Object
| Constructor and Description |
|---|
Documentation2JSONSchema() |
| Modifier and Type | Method and Description |
|---|---|
static void |
printAlpacaHTMLWebDocAsJSONSchema(java.lang.String alpacaDocXML)
This is a standalone helper method that converts properties HTML copied from the Alpaca docs page into a json
schema property list that includes the type and the description.
|
static void |
printPolygonHTMLWebDocAsJSONSchema(java.lang.String polygonDocXML)
This is a standalone helper method that converts response schema HTML copied from the Polygon docs page into a
json schema property list that includes the type and the description.
|
public static void printAlpacaHTMLWebDocAsJSONSchema(java.lang.String alpacaDocXML)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException,
javax.xml.xpath.XPathExpressionException
<div class="spec-table">
<div class="spec-row">
<div class="spec-left"><span class="spec-name">id</span></div>
<div class="spec-right">
<div class="spec-type">string<uuid></div>
<div class="spec-desc">Account ID.</div>
</div>
</div>
...
</div>
alpacaDocXML - the alpaca doc xmljavax.xml.parsers.ParserConfigurationExceptionorg.xml.sax.SAXExceptionjava.io.IOExceptionjavax.xml.xpath.XPathExpressionExceptionpublic static void printPolygonHTMLWebDocAsJSONSchema(java.lang.String polygonDocXML)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException,
javax.xml.xpath.XPathExpressionException
<div class="description">
<div>
<span class="propLabels">
<span class="propName propOpt">name</span>
<span class="propType" title="string">string</span>
</span>
<span class="propDesc">Name of the item.</span>
</div>
...
</div>
polygonDocXML - the polygon doc xmljavax.xml.parsers.ParserConfigurationExceptionorg.xml.sax.SAXExceptionjava.io.IOExceptionjavax.xml.xpath.XPathExpressionException