Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ jobs:
registry-url: https://registry.npmjs.org/
- run: yarn install
- run: yarn ci
- run: npm publish --tag beta
- run: npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# typescript-to-jsonschema
# fast-typescript-to-jsonschema

![Test](https://github.com/yunke-yunfly/typescript-to-jsonschema/workflows/Test/badge.svg)
![Test](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/workflows/Test/badge.svg)

生成typescript类型的jsonschema数据

Expand All @@ -14,7 +14,7 @@
- 1.安装依赖

```js
yarn add typescript-to-jsonschema -D
yarn add fast-typescript-to-jsonschema -D
```

- 2.创建`type.ts`文件,内容如下:
Expand All @@ -30,7 +30,7 @@ interface ITest {
- 3.创建`test.js`文件,内容如下:

```js
const { default: genTypeSchema } = require('typescript-to-jsonschema');
const { default: genTypeSchema } = require('fast-typescript-to-jsonschema');
const path = require('path');

// 目标文件
Expand Down Expand Up @@ -80,7 +80,7 @@ node ./test.js
```

- example 案例地址:
https://github.com/wangweianger/typescript-to-jsonschema/tree/master/example
https://github.com/wangweianger/fast-typescript-to-jsonschema/tree/master/example

## 注释

Expand Down Expand Up @@ -199,6 +199,6 @@ interface Interface_4 {

我们非常欢迎您的贡献,您可以通过以下方式与我们共建。

- 提交[GitHub 问题](https://github.com/yunke-yunfly/typescript-to-jsonschema/issues)以报告错误或提出问题。
- 提出[拉取请求](https://github.com/yunke-yunfly/typescript-to-jsonschema/pulls)以改进我们的代码。
- 提交[GitHub 问题](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/issues)以报告错误或提出问题。
- 提出[拉取请求](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/pulls)以改进我们的代码。
- [贡献指南](CONTRIBUTING.md)。
13 changes: 10 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
{
"name": "typescript-to-jsonschema",
"version": "0.0.1-beta.2",
"name": "fast-fast-typescript-to-jsonschema",
"version": "0.0.1",
"description": "fast-typescript-to-jsonschema generates JSON Schema files from your Typescript sources.",
"main": "./dist/index.js",
"typings": "dist/index.d.ts",
"repository": "https://github.com/yunke-yunfly/typescript-to-jsonschema",
"repository": "https://github.com/yunke-yunfly/fast-typescript-to-jsonschema",
"author": "zane <[email protected]>",
"license": "MIT",
"keywords": [
"typescript",
"json",
"jsonschema",
"schema"
],
"scripts": {
"build": "gts clean && tsc",
"dev": "tsc --watch",
Expand Down