Skip to content

Commit c3efba4

Browse files
authored
Merge pull request #52 from cloudcome/feat/v0.x
Feat/v0.x
2 parents a45522f + e9cff61 commit c3efba4

File tree

7 files changed

+1227
-18
lines changed

7 files changed

+1227
-18
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ jobs:
1313
release:
1414
runs-on: ubuntu-latest
1515
steps:
16+
- name: 修改为中国时区
17+
run: |
18+
sudo rm /etc/localtime
19+
sudo ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
1620
- uses: google-github-actions/release-please-action@v3
1721
id: release
1822
with:

.github/workflows/review.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ jobs:
1111
review:
1212
runs-on: ubuntu-latest
1313
steps:
14+
- name: 修改为中国时区
15+
run: |
16+
sudo rm /etc/localtime
17+
sudo ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
1418
- uses: actions/checkout@v3
1519
- uses: actions/setup-node@v3
1620
with:

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
# oas-gen-ts
22

3+
---
4+
5+
[![review][review-badge]][review-link] ![version][version-badge] ![license][license-badge]
6+
37
OpenAPI Specification ➡️ TypeScript
48

9+
Convert OpenAPI Specification declaration files into type declarations and executable functions. Compared with other similar tools, it has the following characteristics
10+
11+
- Each API is a function for easy tree shaking at build time
12+
- Easily integrate with local request clients, such as Axios instances created in local projects
13+
- Easy to use, easy to learn, type safe
14+
515
# Install
616

717
```shell
@@ -22,9 +32,10 @@ Create oas.config.js or oas.json in the root directory of the project, and refer
2232

2333
The search order for configuration files is `oas.config.cjs`, `oas.config.js`, `oas.json`.
2434

25-
```javascript
35+
```js
2636
// oas.config.cjs
2737
const { defineConfig } = require('oas-gen-ts');
38+
2839
module.exports = defineConfig({
2940
axiosImport: `import { axios } from '@/util/axios';`,
3041
list: [
@@ -129,3 +140,8 @@ generate({
129140
| `spec` | `Spec` | `false` | The local Objects of the OpenAPI Specification | `undefined` |
130141

131142
**At least one of `url` and `spec` exists**
143+
144+
[review-badge]: https://github.com/cloudcome/oas-gen-ts/actions/workflows/review.yml/badge.svg
145+
[review-link]: https://github.com/cloudcome/oas-gen-ts/actions/workflows/review.yml
146+
[version-badge]: https://img.shields.io/npm/v/oas-gen-ts
147+
[license-badge]: https://img.shields.io/github/license/cloudcome/oas-gen-ts

0 commit comments

Comments
 (0)