Hello,
I would like to offer the JSNodeTypes library to Apache Sling as a
contribution.
It provides a JavaScript API for JCR node types.
I use it in the new code update of the Sling Resource Editor at the "Add
Node" dialog to provide:
o the applicable node names
o the applicable node types
o the applicable node name / node type combinations and
o a warning if a resource type is entered even though the chosen node
type does not allow for it.
Here you find a demo of the full API and all background information:
http://www.jcrbrowser.org/sling/libs/jsnodetypes/content/documentation.html
This library is Apache 2 licensed and plain JavaScript and Java. It is
39kB and does not contain dependencies external to Sling. To replace the
Gson dependency with oa.sling.commons.json most of the Java runtime code
has been rewritten.
Of course I'm committed to maintain this library.
What do you think?
Best,
Sandro