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
Copy file name to clipboardExpand all lines: README.md
+221-33
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,9 @@
2
2
3
3
[日本語](./docs/ja/README-ja.md)
4
4
5
-
This package generates TypeScript typedefs and API Client from the OpenAPI v3 series API specification.
6
-
It uses TypeScript AST to generate the code, and converts it exactly to TypeScript code.
7
-
It not only converts `allOf` and `oneOf` into `intersection` type and `union` type, but also converts the directory structure of the reference destination into `namespace` and generates the API Client.
8
-
The hierarchical structure of the directory is converted to the hierarchical structure of the type definition.
5
+
This library provides TypeScript type definitions and extracted parameters from OpenAPI v3.0.x compliant specifications.
6
+
TypeScript AST is used to generate the code, which is accurately converted to TypeScript code.
7
+
Since the parameters extracted from OpenAPI can be used freely, it can be used for automatic generation of API Client and Server Side code, load balancer configuration files, etc.
9
8
10
9
## Usage
11
10
@@ -17,63 +16,252 @@ The hierarchical structure of the directory is converted to the hierarchical str
We have an entry point in `option.rewriteCodeAfterTypeDeclaration` to generate non-typed code.
47
-
The first argument can be TypeScript's `TransformationContext`, and the second argument contains the information of the type definition generated before this.
48
-
By using [ts-ast-viewer](https://ts-ast-viewer.com), code extension by AST can facilitate code extension.
This is a type definition file for `Templates.ApiClient`. The reason it is not included in `generateTypeDefinition` is that you may not use the type definition generated by this function depending on your usage.
237
+
238
+
※ The reason it is not included in `generateTypeDefinition` is that you may not use the type definitions generated by this function depending on your application.
There is a limitation on the directory structure supported.
79
267
To simplify implementation when converting directory structures to TypeScript namespaces, Remote References using `$ref` should only be defined in the following directory structures.
@@ -91,7 +279,7 @@ components/
91
279
paths/
92
280
```
93
281
94
-
####HTTP communication restrictions for Remote Reference
282
+
### HTTP communication restrictions for Remote Reference
95
283
96
284
`$ref: http://....` Currently not supported. We hope to support it in the future.
97
285
@@ -103,7 +291,7 @@ Adding test cases is a very powerful support for stabilizing the behavior, so pl
103
291
Also, the basic design concepts of this repository can be found below. If you want to make changes that do not follow these concepts, please fork and extend them.
104
292
If your changes are in line with the design concept, please submit a pull request or issue!
105
293
106
-
###Design Concept
294
+
## Design Concept
107
295
108
296
- Be typedef first.
109
297
- Typedefs should not contain any entities (file size should be 0 when typedefs are converted to `.js`)
@@ -113,7 +301,7 @@ If your changes are in line with the design concept, please submit a pull reques
113
301
- Conform to the OpenAPI specification.
114
302
- It should be a single file to maintain portability.
0 commit comments