You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -1263,7 +1264,7 @@ External resolution strategies can be added, removed, replaced or reordered. We'
1263
1264
## Dereference component
1264
1265
1265
1266
Dereferencing is a process of transcluding referencing element (internal or external) with a referenced element
1266
-
using a specific [dereference strategy](https://github.com/swagger-api/apidom/tree/main/packages/apidom-reference/src/dereference/strategies).
1267
+
using a specific [dereference strategy](https://github.com/swagger-api/apidom/tree/main/packages/apidom-reference/src/dereference/strategies). Simply put, dereferencing is a process of reference removal.
1267
1268
Dereferencing strategy is determined by asserting on `mediaType` option. [File Resolution](#file-resolution) (file content is read/fetched)
1268
1269
and [Parse component](#parse-component) (file content is parsed) are used under the hood.
1269
1270
@@ -1273,11 +1274,11 @@ and [Parse component](#parse-component) (file content is parsed) are used under
Total time of dereferencing is now the sum of `external resolution traversing` + `dereference traversing` + sum of `max external resolution per file`.
1621
+
1622
+
1623
+
## Bundle component
1624
+
1625
+
Bundling is a convenient way to package up resources spread across multiple files in a single file
1626
+
(**Compound Document**) using a specific [bundle strategy](https://github.com/swagger-api/apidom/tree/main/packages/apidom-reference/src/bundle/strategies).
1627
+
1628
+
The bundling process for creating a Compound Document is defined as taking references (such as "$ref")
1629
+
to an external Resource and embedding the referenced Resources within the referring document.
1630
+
Bundling SHOULD be done in such a way that all URIs (used for referencing) in the base document
1631
+
and any referenced/embedded documents do not require altering.
1632
+
1633
+
Bundling strategy is determined by asserting on `mediaType` option. [File Resolution](#file-resolution) (file content is read/fetched)
1634
+
and [Parse component](#parse-component) (file content is parsed) are used under the hood.
1635
+
1636
+
**Bundling a file localed on a local filesystem:**
New strategies can be based on a predefined stamp called [BundleStrategy](https://github.com/swagger-api/apidom/blob/main/packages/apidom-reference/src/bundle/strategies/BundleStrategy.ts).
1825
+
1826
+
##### Manipulating bundle strategies
1827
+
1828
+
Bundle strategies can be added, removed, replaced or reordered. We've already covered these techniques in [Manipulating parser plugins section](#manipulating-parser-plugins).
1829
+
1830
+
##### Increasing speed of bundling
1831
+
1832
+
Our default bundling strategies are built on asynchronous sequential traversing of ApiDOM.
1833
+
The total time of bundling is the sum of `traversing` + sum of `external resolution per referencing element`.
1834
+
By having a huge number of external dependencies in your definition file, bundling can get quite slow.
1835
+
Fortunately there is solution for this by running an `external resolution` first,
1836
+
and passing its result to bundling via an option. External resolution is built on asynchronous parallel traversal (on single file),
1837
+
so it's theoretically always faster on huge amount of external dependencies than the bundling.
0 commit comments