Skip to content

Commit

Permalink
Merge pull request #26 from wangweianger/master
Browse files Browse the repository at this point in the history
剔除工具函数$ref随机数命明
  • Loading branch information
wangweianger committed Mar 1, 2023
2 parents 935de15 + 2abab11 commit db726b6
Show file tree
Hide file tree
Showing 8 changed files with 550 additions and 100 deletions.
49 changes: 46 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
## 0.0.8 (2023-02-27)

## 0.0.9 (2023-03-01)

### Bug Fixes

Expand All @@ -11,13 +10,15 @@
* genJsonschema 方法 entry 增加默认值处理 ([cde668a](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/cde668a66e53f69166943fbde95e1abe37176ffe))
* namespace 多层嵌套解析问题 ([78b7b27](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/78b7b277165ada3bef60af4417b563a169f374cc))


### Features

* 1. 新增对npm包类型的支持 2.修复非同类型枚举类型结果不准确问题 3.修复枚举类型中key为字符串时深度循环问题 ([1e9bbad](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/1e9bbadb1635df39e41240978f80e8ccb2e01b06))
* 1. 新增通过 code 生成 jsonschema ([96770e3](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/96770e327ad65d8f6e9e0a79182eea946a6bdef5))
* 1.剔除工具函数$ref随机数命明,优化为静态名称 2.补充工具函数单测案例 ([0af7eed](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/0af7eedda41eb0e67a67bc2af9532dd2f69f21ba))
* 补充code传入方式获取jsonschema单测用例 ([beb20c3](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/beb20c3d9171fa4a75c37cc5a8f783e8fa0725b1))
* 更新文档,新增测试案例 ([84a5788](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/84a5788d9b3593d3df6bd1a011f7590a8fec1794))
* 更新文档,新增测试案例 ([c480e6c](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/c480e6cf2e31b2a12bc9101f11cc0171a47f50c8))
* 关闭 source map ([62fa4dc](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/62fa4dc42071a81990f6608fa748e9599d5da6b6))
* 解析块级文档支持description参数 ([176adcb](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/176adcb6fe3e23772f4228cf4a628c49e2489cca))
* 枚举类型解析问题 ([6467bae](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/6467bae084d9b237c1be516d12b8f6938eecaf83))
* 默认文档切换为英文文档 ([df98316](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/df98316506277468909d8c44b2f8473db3cab13c))
Expand Down Expand Up @@ -45,5 +46,47 @@
* enable sourcemap ([882be37](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/882be37152ff71296c007fe4a1ed6f65c4c3f0c6))
* typescript-to-jsonschema first version ([15632cc](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/15632cce735e96b037c9b01b64abce6056bcf4f2))

## 0.0.8 (2023-02-27)

### Bug Fixes

* 避免原有definitions被覆盖 ([64d2ff6](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/64d2ff626dbb0b33593b6e0c890a8d1026c155a0))
* 泛型默认值,进行深度克隆,避免被覆盖 ([ffb5d2d](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/ffb5d2d2ebe606733fb8031c5b4018eccca67a71))
* 完善重复引用逻辑 ([136e9b0](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/136e9b037acb5c4cc3b47f080c3ee61c5e6880b8))
* 完善重复引用逻辑 ([eed579e](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/eed579e5f18977e35fc0ad8c5ab9f48bad7f4f16))
* 重复引用以及 namespace 多层嵌套解析 ([a08d8d9](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/a08d8d9e8aacef1a5995a23ebaa83dc86c66d415))
* genJsonschema 方法 entry 增加默认值处理 ([cde668a](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/cde668a66e53f69166943fbde95e1abe37176ffe))
* namespace 多层嵌套解析问题 ([78b7b27](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/78b7b277165ada3bef60af4417b563a169f374cc))

### Features

* 1. 新增对npm包类型的支持 2.修复非同类型枚举类型结果不准确问题 3.修复枚举类型中key为字符串时深度循环问题 ([1e9bbad](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/1e9bbadb1635df39e41240978f80e8ccb2e01b06))
* 1. 新增通过 code 生成 jsonschema ([96770e3](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/96770e327ad65d8f6e9e0a79182eea946a6bdef5))
* 更新文档,新增测试案例 ([84a5788](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/84a5788d9b3593d3df6bd1a011f7590a8fec1794))
* 更新文档,新增测试案例 ([c480e6c](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/c480e6cf2e31b2a12bc9101f11cc0171a47f50c8))
* 解析块级文档支持description参数 ([176adcb](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/176adcb6fe3e23772f4228cf4a628c49e2489cca))
* 枚举类型解析问题 ([6467bae](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/6467bae084d9b237c1be516d12b8f6938eecaf83))
* 默认文档切换为英文文档 ([df98316](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/df98316506277468909d8c44b2f8473db3cab13c))
* 删除额外属性,处理type为数组情况,完善逻辑 ([265ad1e](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/265ad1e029d96c5ae16257e35e5f68bf54aca6d1))
* 完善additionalProperties处理,补充测试用例 ([1e3fe87](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/1e3fe873462b927eb500f6e74ae47dac8c32a67e))
* 文档优化 ([3591789](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/359178929e255e6f9bef2b9989acc3ecdc1275fb))
* 新增测试覆盖率标识 ([c94dca2](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/c94dca2ed57ed2692d714dfa4bc8d9b403e18e6c))
* 新增测试覆盖率标识 ([56daa19](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/56daa19e2deffb8c1f95d6097e104a6d6efbc971))
* 新增测试覆盖率标识 ([96b1a17](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/96b1a17682b5bfda68c88301ced8096a520b987c))
* 新增测试覆盖率标识 ([1ad1c11](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/1ad1c112d5391319828a553cbf82600526804958))
* 新增测试覆盖率标识 ([4fb6beb](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/4fb6bebe1f6af10c56bb6f4169ca3f900f11b7d9))
* 新增测试覆盖率标识 ([cca0f42](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/cca0f420d53507ff4e52302e2a8471401e3f88e4))
* 修复包名 ([0813a33](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/0813a33085589e0aeb547836fbde371785409aca))
* 修复repository链接 ([24eea13](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/24eea136c8b58ef9148b00cf0adf0b8507496ea5))
* 增加本文件查找引用类型,删除枚举类型时的空definitions ([a7fc272](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/a7fc2721988e50a653e2cfa12f09c10cde4cb59d))
* 增加Partial、Required对联合类型的处理 ([a1c661b](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/a1c661b62b0f5f78136abc5eb4a41ef035df3207))
* 增加Pick/Omit对type的支持 ([46f2a9e](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/46f2a9e220eff2fb2afdc2b6b65fd5371ec2205c))
* 支持工具函数Partial ([fbe9c68](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/fbe9c682d9fb8e24a4e2fd3f05f2420c1c898d43))
* 支持工具函数Required ([486e1ea](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/486e1eaaf0cd9c691eebbd2de1c72252af6203a4))
* add codecov_token ([954b209](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/954b209c3315e88aab95bd8b7678db445e1d5de0))
* add codecov_token ([900ffda](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/900ffda089a792691b6b6a5c9b544172117c0e8e))
* add codecov_token ([22b7069](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/22b7069acb674185bf0994ce8e680b3ad786d134))
* add English docs ([0926ac6](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/0926ac62a84ac035a1569efdfebc61d66c673ca8))
* add license ([1f3fce9](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/1f3fce925597fa8f93acf4b5f89a15b7139fe87f))
* enable sourcemap ([882be37](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/882be37152ff71296c007fe4a1ed6f65c4c3f0c6))
* typescript-to-jsonschema first version ([15632cc](https://github.com/yunke-yunfly/fast-typescript-to-jsonschema/commit/15632cce735e96b037c9b01b64abce6056bcf4f2))
74 changes: 37 additions & 37 deletions jest/toolfn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,37 +29,37 @@ type ToolFn_2 = Omit<{ a: number; b: string; c: boolean }, 'b' | 'c'>;

type ToolFn_3 = Omit<AAA, 'b'>;

// interface ToolFn_4 {
// name: Omit<{ a: number; b: string; c: boolean; }, "b">
// }
interface ToolFn_4 {
name: Omit<{ a: number; b: string; c: boolean; }, "b">
}

// interface ToolFn_5 {
// name: Omit<{ a: number; b: string; c: boolean; }, "b" | "c">
// }
interface ToolFn_5 {
name: Omit<{ a: number; b: string; c: boolean; }, "b" | "c">
}

// interface ToolFn_6 {
// name: Omit<AAA, "b" | "c">
// }
interface ToolFn_6 {
name: Omit<AAA, "b" | "c">
}

// interface ToolFn_7 {
// name: Omit<AAA, "b" | "c"> | AAA
// }
interface ToolFn_7 {
name: AAA | Omit<AAA, "b" | "c">
}

// interface ToolFn_8 {
// name: Array<Omit<AAA, "b" | "c"> | AAA> | Omit<AAA, "b">
// }
interface ToolFn_8 {
name: Array<Omit<AAA, "b" | "c"> | AAA> | Omit<AAA, "b">
}

type ToolFn_9 = Pick<{ a: number; b: string; c: boolean }, 'b'>;

type ToolFn_10 = Pick<AAA, 'b'>;

// interface ToolFn_11 {
// name: Pick<AAA, "b" | "c">
// }
interface ToolFn_11 {
name: Pick<AAA, "b" | "c">
}

// interface ToolFn_12 {
// name: Array<Pick<AAA, "b" | "c"> | AAA> | Pick<AAA, "b">
// }
interface ToolFn_12 {
name: Array<Pick<AAA, "b" | "c"> | AAA> | Pick<AAA, "b">
}

type Page = 'home' | 'about' | 'contact' | string;

Expand All @@ -69,30 +69,30 @@ type ToolFn_14 = Record<'home' | 'about', string>;

type ToolFn_15 = Record<Page, string>;

// interface ToolFn_16 {
// name: Record<"home" | "about" | "contact" | number, string>
// }
interface ToolFn_16 {
name: Record<"home" | "about" | "contact" | number, string>
}

// interface ToolFn_17 {
// name: Record<Page | number, string>
// }
interface ToolFn_17 {
name: Record<Page | number, string>
}

// interface PageInfo {
// title: string;
// some: AAA
// }
interface PageInfo {
title: string;
some: AAA
}

// interface ToolFn_18 {
// name: Record<Page, PageInfo>
// }
interface ToolFn_18 {
name: Record<Page, PageInfo>
}

type Filter = 'a' | 'b';
type ToolFn_16 = Pick<AAA, Filter>;
type ToolFn_16_ = Pick<AAA, Filter>;

type ToolFn_17 = Omit<AAA, Filter>;
type ToolFn_17_ = Omit<AAA, Filter>;


type ToolFn_18 = Partial<AAA>;
type ToolFn_18_ = Partial<AAA>;

type ToolFn_19 = Partial<BBB>;

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fast-typescript-to-jsonschema",
"version": "0.0.8",
"version": "0.0.9",
"description": "fast-typescript-to-jsonschema generates JSON Schema files from your Typescript sources.",
"main": "./dist/index.js",
"typings": "dist/index.d.ts",
Expand Down
Loading

0 comments on commit db726b6

Please sign in to comment.