Skip to content

Commit 6b21c3e

Browse files
refactor: update Readme.md
1 parent 562360c commit 6b21c3e

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -201,25 +201,24 @@ if (document) {
201201

202202
## API documentation
203203

204-
Parser-JS API implements a global API definition for all AsyncAPI parser implementations known as the [Parser-API](https://github.com/asyncapi/parser-api).
205-
This API is designed having in mind developer experience and resiliency to breaking changes.
204+
Parser-JS API implements a global API definition for all AsyncAPI parser implementations known as the [Parser-API](https://github.com/asyncapi/parser-api). This API is designed having in mind developer experience and resiliency to breaking changes.
206205

207206
The following table shows a compatibility matrix between this parser, and the [Parser-API](https://github.com/asyncapi/parser-api), as well as the AsyncAPI spec version supported by each release of this parser.
208207

209-
Parser-JS | Parser-API | Spec 2.x | Spec 3.x
210-
----------|----------------------------------------------------------------------|----------|---------
211-
1.x | | ✓ |
212-
2.x | [1.x](https://github.com/asyncapi/parser-api/blob/master/docs/v1.md) | ✓ |
208+
| Parser-JS | Parser-API | Spec 2.x |
209+
|-----------|----------------------------------------------------------------------|----------|
210+
| 1.x | ||
211+
| 2.x | [1.x](https://github.com/asyncapi/parser-api/blob/master/docs/v1.md) ||
213212

214213
- `` Fully supported version.
215214
- `-` The AsyncAPI Spec version has features the Parser-JS can't use but the rest are fully supported.
216215
- Empty means not supported version.
217216

218-
Additionally to all the methods declared in the [Parser-API](https://github.com/asyncapi/parser-api), this parser might introduce some helper functions.
217+
Additionally to all the methods declared in the [Parser-API](https://github.com/asyncapi/parser-api), this parser might introduce some helper functions like:
219218

220-
Direct access to the parsed JSON document is always available through the `doc.json()` method.
221-
222-
See [API documentation](./docs/api.md) for more examples and full API reference information.
219+
- `json()` which returns the JSON object of the given object. It is possible to pass as an argument the name of a field in an object and retrieve corresponding value.
220+
- `jsonPath()` which returns the JSON Path of the given object.
221+
- `meta()` which returns the metadata of a given object, like a parsed AsyncAPI Document.
223222

224223
## Using in the browser/SPA applications
225224

@@ -345,7 +344,7 @@ In addition, the [`convertToOldAPI()` function](#convert-to-the-old-api) which c
345344
Parser dereferences all circular references by default. In addition, to simplify interactions with the parser, the following is added:
346345

347346
- `x-parser-circular` property is added to the root of the AsyncAPI document to indicate that the document contains circular references. In old API the Parser exposes `hasCircular()` function to check if given AsyncAPI document has circular references.
348-
- `isCircular()` function is added to the [Schema Model](./src/models/schema.ts) to determine if a given schema is circular with respect to previously occurring schemas in the tree.
347+
- `isCircular()` function is added to the [Schema Model](./src/models/schema.ts) to determine if a given schema is circular with respect to previously occurring schemas in the JSON tree.
349348

350349
## Stringify
351350

@@ -395,6 +394,7 @@ Versions `<5` of Webpack should handle bundling without problems. Due to the fac
395394
fallback: {
396395
"fs": false,
397396
"path": false,
397+
"util": false,
398398
"buffer": require.resolve("buffer/"),
399399
}
400400
}

0 commit comments

Comments
 (0)