@automatons/parser 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -45
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,47 +1,9 @@
|
|
|
1
|
-
#
|
|
2
|
-
[](https://github.com/semantic-release/semantic-release)
|
|
5
|
-
[](https://www.npmjs.com/package/openapi-automatons)
|
|
1
|
+
# @automatons/parser
|
|
2
|
+
[](https://github.com/openapi-automatons/parser/actions/workflows/ci-cd.yml)
|
|
3
|
+
[](https://www.npmjs.com/package/@automatons/parser)
|
|
6
4
|
|
|
7
|
-
## What
|
|
8
|
-
This
|
|
5
|
+
## What is @automatons/parser
|
|
6
|
+
This is the OpenAPI parser used by openapi-automatons generators.
|
|
7
|
+
Only use via [openapi-automatons](https://github.com/openapi-automatons/openapi-automatons).
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
| name | language | type | example |
|
|
12
|
-
| ---- | -------- | ---- | ------- |
|
|
13
|
-
| @automatons/typescript-axios | typescript | client | [example](https://github.com/openapi-automatons/openapi-automatons/tree/main/examples/typescript/clients/axios "example") |
|
|
14
|
-
|
|
15
|
-
## Get Started
|
|
16
|
-
1. Install library to your project
|
|
17
|
-
```shell script
|
|
18
|
-
yarn add -D openapi-automatons @automatons/typescript-axios
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
2. Create settings in your project root
|
|
22
|
-
```json:automatons.json
|
|
23
|
-
{
|
|
24
|
-
"openapi": "openapi.yml",
|
|
25
|
-
"automatons": [{
|
|
26
|
-
"automaton": "@automatons/typescript-axios",
|
|
27
|
-
"outDir": "src/clients"
|
|
28
|
-
}]
|
|
29
|
-
}
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
3. Add generate command your package.json
|
|
33
|
-
```json:package.json
|
|
34
|
-
{
|
|
35
|
-
"scripts": {
|
|
36
|
-
"generate": "openapi-automatons"
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## Automatons.json
|
|
42
|
-
| property | | type | required | description |
|
|
43
|
-
| -------- | --- | ---- | -------- | ----------- |
|
|
44
|
-
| openapi | | string | true | This is openapi path. It can be relative or absolute. Also, there is no problem with the url format.|
|
|
45
|
-
| automatons | | array | true | This is the property that contains the module. |
|
|
46
|
-
| automatons | automaton | string | true | This is the module name. You can embed your own module. It is also possible to include it with a relative path. |
|
|
47
|
-
| automatons | outDir | string | true | This is the output directory of module. |
|
|
9
|
+
Since v1 this package is **ESM-only** and requires **Node.js >= 22**.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automatons/parser",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"repository": "https://github.com/openapi-automatons/parser.git",
|
|
5
5
|
"author": "tanmen <yt.prog@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@types/node": "^24.0.0",
|
|
46
46
|
"@vitest/coverage-v8": "^3.2.0",
|
|
47
47
|
"depcheck": "^1.4.7",
|
|
48
|
-
"eslint": "^
|
|
48
|
+
"eslint": "^10.4.1",
|
|
49
49
|
"husky": "^9.1.7",
|
|
50
50
|
"lint-staged": "^17.0.7",
|
|
51
51
|
"semantic-release": "^25.0.3",
|