Skip to content

Commit

Permalink
Improved support for reference resolution allowing for resource path …
Browse files Browse the repository at this point in the history
…offsets to be traversed more efficiently and adding path traversal to core Alpaca resolvers
  • Loading branch information
cloudcms committed Oct 29, 2020
1 parent b608177 commit 37966a7
Show file tree
Hide file tree
Showing 4 changed files with 305 additions and 175 deletions.
14 changes: 9 additions & 5 deletions site/docs/api/references.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ to identify a URI to a remote resource. It also allows you to point to JSON str
current document, enabling re-use.

Alpaca extends `$ref` by allowing for additional loaders such as a dictionary definition loader for Cloud CMS.
Alapca lets you register <a href="/documentation/connectors.html">Connectors</a> to handle loading of your custom
Alpaca lets you register <a href="/documentation/connectors.html">Connectors</a> to handle loading of your custom
`$ref` values.

Alpaca also lets you use `$ref` structures within your options blocks. This lets you load options from remote sources
Expand All @@ -32,7 +32,11 @@ https://www.cloudcms.com/documentation/forms/references.html

https://www.cloudcms.com/documentation/content-models/references.html

## Example #1: Nested Tree (using Array)


## Examples

### Example #1: Nested Tree (using Array)

This example demonstrates the use of JSON Schema referencing to include or pull in
schema definitions from other parts of the document. Alpaca supports referencing within
Expand Down Expand Up @@ -68,7 +72,7 @@ $("#field1").alpaca({
{% endraw %}


## Example #2: Deeply Nested Tree (loaded from data)
### Example #2: Deeply Nested Tree (loaded from data)

This example shows a deeply nested tree loaded with data. Note that unlike the previous
example, this example uses a non-'create' view which allows data to bind.
Expand Down Expand Up @@ -119,7 +123,7 @@ $("#field2").alpaca({
{% endraw %}


## Example #3: Internal Definitions
### Example #3: Internal Definitions

Here is an example of an object that derives one of its sub-object
properties from a referenced definition. The definition is stored in a special
Expand Down Expand Up @@ -170,7 +174,7 @@ $("#field3").alpaca({
{% endraw %}


## Example #4: Using `$ref` within options
### Example #4: Using `$ref` within options

Suppose that you have a remote Author schema and options and that their URIs are:

Expand Down
Loading

0 comments on commit 37966a7

Please sign in to comment.