-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V15 #1
base: master
Are you sure you want to change the base?
Commits on May 15, 2022
-
upgrade json-schema-ref-parser -> 9.0.9
Boris Cherny committedMay 15, 2022 Configuration menu - View commit details
-
Copy full SHA for f943f32 - Browse repository at this point
Copy the full SHA f943f32View commit details -
Optimize optimizer to avoid deep JSON serialization (fix bcherny#422)
Boris Cherny committedMay 15, 2022 Configuration menu - View commit details
-
Copy full SHA for 6fbcbc8 - Browse repository at this point
Copy the full SHA 6fbcbc8View commit details -
Merge pull request bcherny#447 from bcherny/perf/optimize-optimizer
Optimize optimizer to avoid deep JSON serialization (fix bcherny#422)
Configuration menu - View commit details
-
Copy full SHA for ed417b0 - Browse repository at this point
Copy the full SHA ed417b0View commit details -
Boris Cherny committed
May 15, 2022 Configuration menu - View commit details
-
Copy full SHA for 8b3267f - Browse repository at this point
Copy the full SHA 8b3267fView commit details -
Add additionalProperties option (fix bcherny#335)
Boris Cherny committedMay 15, 2022 Configuration menu - View commit details
-
Copy full SHA for 59747b1 - Browse repository at this point
Copy the full SHA 59747b1View commit details -
Boris Cherny committed
May 15, 2022 Configuration menu - View commit details
-
Copy full SHA for 966cca5 - Browse repository at this point
Copy the full SHA 966cca5View commit details -
Merge pull request bcherny#448 from bcherny/drop-node-10
drop support for node v10
Configuration menu - View commit details
-
Copy full SHA for 603773f - Browse repository at this point
Copy the full SHA 603773fView commit details
Commits on May 16, 2022
-
Boris Cherny committed
May 16, 2022 Configuration menu - View commit details
-
Copy full SHA for 4837ef2 - Browse repository at this point
Copy the full SHA 4837ef2View commit details
Commits on May 22, 2022
-
Add reasonable max for tuple types (fix bcherny#438)
Boris Cherny committedMay 22, 2022 Configuration menu - View commit details
-
Copy full SHA for a89ffe1 - Browse repository at this point
Copy the full SHA a89ffe1View commit details -
Merge pull request bcherny#451 from bcherny/438
Add reasonable max for tuple types (fix bcherny#438)
Configuration menu - View commit details
-
Copy full SHA for a7d14c4 - Browse repository at this point
Copy the full SHA a7d14c4View commit details -
Bugfix: make compile() non-mutating (fix bcherny#370, fix bcherny#443)
Boris Cherny committedMay 22, 2022 Configuration menu - View commit details
-
Copy full SHA for b78a616 - Browse repository at this point
Copy the full SHA b78a616View commit details -
Bugfix: Add support for dollar-id in sub-schemas (fix bcherny#436)
Boris Cherny committedMay 22, 2022 Configuration menu - View commit details
-
Copy full SHA for 7aa353d - Browse repository at this point
Copy the full SHA 7aa353dView commit details -
Merge pull request bcherny#452 from bcherny/436
Bugfix: Add support for $id in sub-schemas
Configuration menu - View commit details
-
Copy full SHA for e65ad1f - Browse repository at this point
Copy the full SHA e65ad1fView commit details
Commits on Jun 7, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 82fa551 - Browse repository at this point
Copy the full SHA 82fa551View commit details
Commits on Jun 11, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 9212a77 - Browse repository at this point
Copy the full SHA 9212a77View commit details
Commits on Jun 26, 2022
-
sort paths returned by getPaths
hopefully ensures a stable order for testing snapshots across different systems.
Configuration menu - View commit details
-
Copy full SHA for d8592cd - Browse repository at this point
Copy the full SHA d8592cdView commit details -
🧹 Updated snapshots with new file order
This will reduce the diff when comparing actual changes (done on linux)
Configuration menu - View commit details
-
Copy full SHA for 8bdef9a - Browse repository at this point
Copy the full SHA 8bdef9aView commit details -
use double quotes for glob patterns
avoids early expansion and false negative test runs on some platforms, mostly mine.
Configuration menu - View commit details
-
Copy full SHA for d348981 - Browse repository at this point
Copy the full SHA d348981View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8fa728e - Browse repository at this point
Copy the full SHA 8fa728eView commit details
Commits on Jun 27, 2022
-
Merge pull request bcherny#464 from s-weigand/cross-platform-tests-re…
…based 🧪 Cross platform tests (follow up)
Configuration menu - View commit details
-
Copy full SHA for 0df0664 - Browse repository at this point
Copy the full SHA 0df0664View commit details
Commits on Jun 29, 2022
-
cleanup: update to namespaced json-schema-ref-parser package name
Boris Cherny committedJun 29, 2022 Configuration menu - View commit details
-
Copy full SHA for 224a352 - Browse repository at this point
Copy the full SHA 224a352View commit details -
cleanup: kill vestigial verbose flag for ava
Boris Cherny committedJun 29, 2022 Configuration menu - View commit details
-
Copy full SHA for e82df8e - Browse repository at this point
Copy the full SHA e82df8eView commit details -
cleanup: downgrade glob version to avoid peerDependency warning
Boris Cherny committedJun 29, 2022 Configuration menu - View commit details
-
Copy full SHA for a92d7c9 - Browse repository at this point
Copy the full SHA a92d7c9View commit details -
Fix cycles during generating (fix bcherny#376, fix bcherny#323)
Boris Cherny committedJun 29, 2022 Configuration menu - View commit details
-
Copy full SHA for 2ca6e50 - Browse repository at this point
Copy the full SHA 2ca6e50View commit details -
Merge pull request bcherny#453 from bcherny/376
Fix cycles during emission (fix bcherny#376, fix bcherny#323)
Configuration menu - View commit details
-
Copy full SHA for c6676b6 - Browse repository at this point
Copy the full SHA c6676b6View commit details -
Boris Cherny committed
Jun 29, 2022 Configuration menu - View commit details
-
Copy full SHA for 65a8239 - Browse repository at this point
Copy the full SHA 65a8239View commit details
Commits on Jul 1, 2022
-
fix broken dependency (fix bcherny#465)
Boris Cherny committedJul 1, 2022 Configuration menu - View commit details
-
Copy full SHA for 2b70bc3 - Browse repository at this point
Copy the full SHA 2b70bc3View commit details -
Boris Cherny committed
Jul 1, 2022 Configuration menu - View commit details
-
Copy full SHA for ab60479 - Browse repository at this point
Copy the full SHA ab60479View commit details -
fix commit sha for json-schema-ref-parser dep
Boris Cherny committedJul 1, 2022 Configuration menu - View commit details
-
Copy full SHA for b2027df - Browse repository at this point
Copy the full SHA b2027dfView commit details -
Configuration menu - View commit details
-
Copy full SHA for efc311a - Browse repository at this point
Copy the full SHA efc311aView commit details
Commits on Aug 6, 2022
-
Use forked json-schema-ref-parser (fix bcherny#469)
Boris Cherny committedAug 6, 2022 Configuration menu - View commit details
-
Copy full SHA for 84c9db1 - Browse repository at this point
Copy the full SHA 84c9db1View commit details -
Boris Cherny committed
Aug 6, 2022 Configuration menu - View commit details
-
Copy full SHA for 8c1860c - Browse repository at this point
Copy the full SHA 8c1860cView commit details -
Boris Cherny committed
Aug 6, 2022 Configuration menu - View commit details
-
Copy full SHA for c7590c5 - Browse repository at this point
Copy the full SHA c7590c5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 97e562f - Browse repository at this point
Copy the full SHA 97e562fView commit details
Commits on Aug 7, 2022
-
Merge pull request bcherny#474 from JoshuaKGoldberg/eslint-not-tslint
fix: replace TSLint disables with ESLint
Configuration menu - View commit details
-
Copy full SHA for 1a45ce3 - Browse repository at this point
Copy the full SHA 1a45ce3View commit details -
Boris Cherny committed
Aug 7, 2022 Configuration menu - View commit details
-
Copy full SHA for dc0f63f - Browse repository at this point
Copy the full SHA dc0f63fView commit details -
cleanup: use defs internally, not definitions
Boris Cherny committedAug 7, 2022 Configuration menu - View commit details
-
Copy full SHA for 34de194 - Browse repository at this point
Copy the full SHA 34de194View commit details
Commits on Aug 13, 2022
-
Boris Cherny committed
Aug 13, 2022 Configuration menu - View commit details
-
Copy full SHA for 2083db1 - Browse repository at this point
Copy the full SHA 2083db1View commit details
Commits on Aug 26, 2022
-
Merge branch 'master' of github.com:bcherny/json-schema-to-typescript
Boris Cherny committedAug 26, 2022 Configuration menu - View commit details
-
Copy full SHA for 864e1cb - Browse repository at this point
Copy the full SHA 864e1cbView commit details
Commits on Sep 27, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 69a393a - Browse repository at this point
Copy the full SHA 69a393aView commit details
Commits on Oct 18, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 9a8925d - Browse repository at this point
Copy the full SHA 9a8925dView commit details
Commits on Nov 16, 2022
-
This looks like an amazing project, but a license is required in order for us to use it. Would you mind adding an explicit MIT license? Thanks!
Configuration menu - View commit details
-
Copy full SHA for 94bd13a - Browse repository at this point
Copy the full SHA 94bd13aView commit details
Commits on Jan 21, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 7e6c2b4 - Browse repository at this point
Copy the full SHA 7e6c2b4View commit details -
Configuration menu - View commit details
-
Copy full SHA for f87aad4 - Browse repository at this point
Copy the full SHA f87aad4View commit details -
switch back to standard json-schema-ref-parser release, now that json…
…-schema-ref-parser/pull/281 was merged
Configuration menu - View commit details
-
Copy full SHA for 137f6a7 - Browse repository at this point
Copy the full SHA 137f6a7View commit details
Commits on Feb 5, 2023
-
Configuration menu - View commit details
-
Copy full SHA for f8982cc - Browse repository at this point
Copy the full SHA f8982ccView commit details
Commits on Feb 6, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 4b01877 - Browse repository at this point
Copy the full SHA 4b01877View commit details
Commits on Feb 19, 2023
-
Merge pull request bcherny#495 from YairHalberstadt/patch-1
Add MIT License
Configuration menu - View commit details
-
Copy full SHA for 1385ef5 - Browse repository at this point
Copy the full SHA 1385ef5View commit details -
Boris Cherny committed
Feb 19, 2023 Configuration menu - View commit details
-
Copy full SHA for 7583a25 - Browse repository at this point
Copy the full SHA 7583a25View commit details -
Merge pull request bcherny#493 from tlahav/fix-eslint-settings
Fixed eslint extension setting
Configuration menu - View commit details
-
Copy full SHA for 351ee06 - Browse repository at this point
Copy the full SHA 351ee06View commit details -
lock jsrp minor version (see APIDevTools/json-schema-ref-parser#307)
Boris Cherny committedFeb 19, 2023 Configuration menu - View commit details
-
Copy full SHA for eb15918 - Browse repository at this point
Copy the full SHA eb15918View commit details -
add read-through network cache to improve test reliability
Boris Cherny committedFeb 19, 2023 Configuration menu - View commit details
-
Copy full SHA for 8842142 - Browse repository at this point
Copy the full SHA 8842142View commit details -
Boris Cherny committed
Feb 19, 2023 Configuration menu - View commit details
-
Copy full SHA for 8ca8217 - Browse repository at this point
Copy the full SHA 8ca8217View commit details -
Boris Cherny committed
Feb 19, 2023 Configuration menu - View commit details
-
Copy full SHA for 810ef47 - Browse repository at this point
Copy the full SHA 810ef47View commit details
Commits on Feb 20, 2023
-
Merge branch 'master' of https://github.com/bcherny/json-schema-to-ty…
…pescript into fix/parse-enum-values-as-literals
Configuration menu - View commit details
-
Copy full SHA for 5a9a5bb - Browse repository at this point
Copy the full SHA 5a9a5bbView commit details -
Configuration menu - View commit details
-
Copy full SHA for cea04ae - Browse repository at this point
Copy the full SHA cea04aeView commit details
Commits on Feb 23, 2023
-
switch back to forked jsrp, with patched minimum node version
Boris Cherny committedFeb 23, 2023 Configuration menu - View commit details
-
Copy full SHA for e653ab3 - Browse repository at this point
Copy the full SHA e653ab3View commit details -
Boris Cherny committed
Feb 23, 2023 Configuration menu - View commit details
-
Copy full SHA for de9b027 - Browse repository at this point
Copy the full SHA de9b027View commit details -
Merge pull request bcherny#509 from notaphplover/fix/parse-enum-value…
…s-as-literals Update parser to parse enum values as literals
Configuration menu - View commit details
-
Copy full SHA for b73e1c7 - Browse repository at this point
Copy the full SHA b73e1c7View commit details -
Boris Cherny committed
Feb 23, 2023 Configuration menu - View commit details
-
Copy full SHA for 6e3fbca - Browse repository at this point
Copy the full SHA 6e3fbcaView commit details -
Merge branch 'master' of https://github.com/bcherny/json-schema-to-ty…
…pescript into fix/boolean-json-schemas
Configuration menu - View commit details
-
Copy full SHA for d81f3dc - Browse repository at this point
Copy the full SHA d81f3dcView commit details -
Configuration menu - View commit details
-
Copy full SHA for c4b7639 - Browse repository at this point
Copy the full SHA c4b7639View commit details -
Configuration menu - View commit details
-
Copy full SHA for e291034 - Browse repository at this point
Copy the full SHA e291034View commit details
Commits on May 2, 2023
-
Configuration menu - View commit details
-
Copy full SHA for e977383 - Browse repository at this point
Copy the full SHA e977383View commit details -
Configuration menu - View commit details
-
Copy full SHA for b1f9f3a - Browse repository at this point
Copy the full SHA b1f9f3aView commit details
Commits on May 4, 2023
-
Merge pull request bcherny#515 from notaphplover/fix/boolean-json-sch…
…emas Fix boolean json schemas
Configuration menu - View commit details
-
Copy full SHA for 05b0103 - Browse repository at this point
Copy the full SHA 05b0103View commit details -
Configuration menu - View commit details
-
Copy full SHA for 413517d - Browse repository at this point
Copy the full SHA 413517dView commit details -
Merge pull request bcherny#423 from mrcljx/mrcljx/fix-strict-index-si…
…gnatures-standalone Fix strictIndexSignature with standalone types
Configuration menu - View commit details
-
Copy full SHA for 8f973d1 - Browse repository at this point
Copy the full SHA 8f973d1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4d0176f - Browse repository at this point
Copy the full SHA 4d0176fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 20c7f1f - Browse repository at this point
Copy the full SHA 20c7f1fView commit details -
Configuration menu - View commit details
-
Copy full SHA for dc366e6 - Browse repository at this point
Copy the full SHA dc366e6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 33aa09d - Browse repository at this point
Copy the full SHA 33aa09dView commit details
Commits on Jun 10, 2023
-
[Bugfix] fix emission for unnamed enums in arrays (fix bcherny#530)
Boris Cherny committedJun 10, 2023 Configuration menu - View commit details
-
Copy full SHA for c04143c - Browse repository at this point
Copy the full SHA c04143cView commit details -
Boris Cherny committed
Jun 10, 2023 Configuration menu - View commit details
-
Copy full SHA for f43ab4c - Browse repository at this point
Copy the full SHA f43ab4cView commit details
Commits on Aug 27, 2023
-
Add support for deprecated keyword (Fixes bcherny#441) (bcherny#542)
* Initial support for deprecated keyword * Remove unnecessary ? * Fix missing deprecated parameter * Add e2e test for keyword deprecated * extended e2e tet to cover deprecated schema and deprecated:false * Added description property to each item in e2e test to test interaction with the deprecated comment * Added description property to another object with a true deprecated in e2e test to test outcome of a true deprecated between a true deprecated and a false deprecated * Fix whitespace and improve comments * Simplify generateComment --------- Co-authored-by: iansw246 <35947093+iansw246@users.noreply.github.com> Co-authored-by: Michelle Tan <michelle0223@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for f797848 - Browse repository at this point
Copy the full SHA f797848View commit details -
Configuration menu - View commit details
-
Copy full SHA for c826963 - Browse repository at this point
Copy the full SHA c826963View commit details -
Configuration menu - View commit details
-
Copy full SHA for a104878 - Browse repository at this point
Copy the full SHA a104878View commit details -
Configuration menu - View commit details
-
Copy full SHA for aebe91e - Browse repository at this point
Copy the full SHA aebe91eView commit details -
Configuration menu - View commit details
-
Copy full SHA for fe580b6 - Browse repository at this point
Copy the full SHA fe580b6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 34cb853 - Browse repository at this point
Copy the full SHA 34cb853View commit details -
Configuration menu - View commit details
-
Copy full SHA for 699eda8 - Browse repository at this point
Copy the full SHA 699eda8View commit details
Commits on Aug 29, 2023
-
Fix crash when a field has 'deprecated', but not 'description' (bcher…
…ny#549) * Add failing test case * Fix crash when deprecated is defined without description * Add test case for bcherny#540 too
Configuration menu - View commit details
-
Copy full SHA for 2887a52 - Browse repository at this point
Copy the full SHA 2887a52View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3bb5d2b - Browse repository at this point
Copy the full SHA 3bb5d2bView commit details
Commits on Jan 14, 2024
-
Configuration menu - View commit details
-
Copy full SHA for bf63b97 - Browse repository at this point
Copy the full SHA bf63b97View commit details -
Configuration menu - View commit details
-
Copy full SHA for 569f492 - Browse repository at this point
Copy the full SHA 569f492View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6adcad9 - Browse repository at this point
Copy the full SHA 6adcad9View commit details
Commits on Mar 2, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 7321597 - Browse repository at this point
Copy the full SHA 7321597View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5369633 - Browse repository at this point
Copy the full SHA 5369633View commit details
Commits on Apr 20, 2024
-
Configuration menu - View commit details
-
Copy full SHA for d92b06e - Browse repository at this point
Copy the full SHA d92b06eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4f47952 - Browse repository at this point
Copy the full SHA 4f47952View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7c9ecd7 - Browse repository at this point
Copy the full SHA 7c9ecd7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9cbe26e - Browse repository at this point
Copy the full SHA 9cbe26eView commit details -
Configuration menu - View commit details
-
Copy full SHA for e39ed18 - Browse repository at this point
Copy the full SHA e39ed18View commit details -
Configuration menu - View commit details
-
Copy full SHA for 11879fa - Browse repository at this point
Copy the full SHA 11879faView commit details
Commits on Apr 21, 2024
-
feat: support
customName
options (bcherny#585)* feat: support `customName` options * feat: support nullish name for `customName`
Configuration menu - View commit details
-
Copy full SHA for 2f29f19 - Browse repository at this point
Copy the full SHA 2f29f19View commit details -
[Chore] Downgrade ESLint -> 8.56.0
Doing this to avoid warnings when running `npm i`, since @typescript-eslint still requires 8.56.
Boris Cherny committedApr 21, 2024 Configuration menu - View commit details
-
Copy full SHA for 5f3039a - Browse repository at this point
Copy the full SHA 5f3039aView commit details -
[Docs] Document customName option in readme
Boris Cherny committedApr 21, 2024 Configuration menu - View commit details
-
Copy full SHA for f97ec06 - Browse repository at this point
Copy the full SHA f97ec06View commit details -
Boris Cherny committed
Apr 21, 2024 Configuration menu - View commit details
-
Copy full SHA for d97768e - Browse repository at this point
Copy the full SHA d97768eView commit details -
feat: [577] Add yml support (bcherny#588)
* feat: [577] Add yml support * Update README.md Co-authored-by: Boris Cherny <boris@performancejs.com> * feat: [577] Add yml support * feat: [577] Rebase - master --------- Co-authored-by: Boris Cherny <boris@performancejs.com>
Configuration menu - View commit details
-
Copy full SHA for 9ec0c70 - Browse repository at this point
Copy the full SHA 9ec0c70View commit details
Commits on Apr 23, 2024
-
[Chore] Drop @types/prettier dependency. (bcherny#594)
It is now deprecated as the types are now part of the prettier lib. Fixes bcherny#593 Co-authored-by: Pascal Corpet <lascap@lascap-mac.lan>
Configuration menu - View commit details
-
Copy full SHA for 13806bd - Browse repository at this point
Copy the full SHA 13806bdView commit details
Commits on May 2, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 872a057 - Browse repository at this point
Copy the full SHA 872a057View commit details -
Configuration menu - View commit details
-
Copy full SHA for e53bb80 - Browse repository at this point
Copy the full SHA e53bb80View commit details -
Configuration menu - View commit details
-
Copy full SHA for add8ee1 - Browse repository at this point
Copy the full SHA add8ee1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2b61748 - Browse repository at this point
Copy the full SHA 2b61748View commit details -
Configuration menu - View commit details
-
Copy full SHA for 39dd574 - Browse repository at this point
Copy the full SHA 39dd574View commit details -
Configuration menu - View commit details
-
Copy full SHA for 107c338 - Browse repository at this point
Copy the full SHA 107c338View commit details -
Configuration menu - View commit details
-
Copy full SHA for c9680db - Browse repository at this point
Copy the full SHA c9680dbView commit details -
Configuration menu - View commit details
-
Copy full SHA for e8291d7 - Browse repository at this point
Copy the full SHA e8291d7View commit details
Commits on May 5, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 6c69141 - Browse repository at this point
Copy the full SHA 6c69141View commit details
Commits on May 12, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 49fb14d - Browse repository at this point
Copy the full SHA 49fb14dView commit details
Commits on Jun 2, 2024
-
Update README.md: fix definition of customName (bcherny#596)
Added escape chars to avoid the `|` in type definition being interpreted as cell separator
Configuration menu - View commit details
-
Copy full SHA for 5d24faa - Browse repository at this point
Copy the full SHA 5d24faaView commit details -
Configuration menu - View commit details
-
Copy full SHA for b7fee29 - Browse repository at this point
Copy the full SHA b7fee29View commit details -
Configuration menu - View commit details
-
Copy full SHA for 89a7b32 - Browse repository at this point
Copy the full SHA 89a7b32View commit details
Commits on Jun 20, 2024
-
Configuration menu - View commit details
-
Copy full SHA for fcb6f73 - Browse repository at this point
Copy the full SHA fcb6f73View commit details -
Configuration menu - View commit details
-
Copy full SHA for 31993de - Browse repository at this point
Copy the full SHA 31993deView commit details
Commits on Jun 25, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 74d6126 - Browse repository at this point
Copy the full SHA 74d6126View commit details -
Add option to generate TS string enums (bcherny#578)
* Add option to generate TS string enums * Added e2e test for --inferStringEnumKeysFromValues
Configuration menu - View commit details
-
Copy full SHA for 3e2e1e9 - Browse repository at this point
Copy the full SHA 3e2e1e9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6fc74b3 - Browse repository at this point
Copy the full SHA 6fc74b3View commit details
Commits on Jun 26, 2024
-
Configuration menu - View commit details
-
Copy full SHA for e0a822f - Browse repository at this point
Copy the full SHA e0a822fView commit details
Commits on Jul 22, 2024
-
Intersection schema generation is order-dependent (bcherny#603)
* Add new test cases. * Intersection schema generation is order-dependent - Given a schema that contains a named definition (`B`), - And that named definition is referenced in multiple locations, - And that named schema is also an intersection type (`allOf` in this example), Then when parsed, the generated TypeScript will contain the correct reference only for the _first_ location in which the named schema is encountered, during a depth-first traversal. Subsequent references to the same schema will be generated as though they were only the intersection type, and not the named schema. Example Given the following schema: ```yaml $id: Intersection type: object oneOf: - $ref: '#/definitions/A' - $ref: '#/definitions/B' definitions: A: type: object additionalProperties: false allOf: [$ref: '#/definitions/Base'] properties: b: {$ref: '#/definitions/B'} B: type: object additionalProperties: false, allOf: [$ref: '#/definitions/Base'] properties: x: {type: string} Base: type: object additionalProperties: false, properties: y: {type: string} ``` The current resulting TypeScript will be (comments adjusted for clarity): ```ts // Incorrect: should be `type Intersection = A | B` // Note that the B type at this location is the _second_ reference to // B during a depth-first traversal. export type Intersection = A | B1; export type A = A1 & { b?: B; }; export type A1 = Base; export type B = B1 & { x?: string; }; export type B1 = Base; export interface Base { y?: string; } ``` Root Cause In `parser.ts`, [lines 57 - 75][1], when schema that matches multiple "types" is encountered, the parser generates a new `ALL_OF` intersection schema to contain each sub-type, then adds each sub-type to the new `ALL_OF` schema. Each sub-type is then parsed sequentially. During this process, `maybeStripNameHints` is called, which mutates the schema by removing the `$id`, `description`, and `name` properties. Notably, these properties are used by `typesOfSchema` to detect the `NAMED_SCHEMA` type. As a result, this schema object will never again be detected as a `NAMED_SCHEMA` type. Therefore, the _first_ instance of the schema object is correctly handled as an intersection schema **and** a named schema, but all subsequent instances are treated as though they are **only** an intersection schema. Proposed Solution - The call to `typesOfSchema` is moved from `parser.ts` to `normalizer.ts`, with the goal of avoiding confusion due to a mutated schema object. The resulting list of schema types is persisted on the schema using a newly-introduced `Types` symbol. - The generated intersection schema is _also_ moved from `parser.ts` to `normalizer.ts`. This is because it is advantageous to let the generated intersection schema participate in the caching mechanism (which it could not previously do, since it was generated dynamically during each encounter). Without this, multiple instances of the same schema are generated. Related Issues - bcherny#597 [1]: https://github.com/bcherny/json-schema-to-typescript/blob/31993def993b610ba238d3024260129e31ddc371/src/parser.ts#L57-L75 'parser.ts, lines 57 - 75' * Additionally hoist `allOf` behavior. * Traverse the generated intersection schema.
Configuration menu - View commit details
-
Copy full SHA for 62cc052 - Browse repository at this point
Copy the full SHA 62cc052View commit details -
Configuration menu - View commit details
-
Copy full SHA for 402e188 - Browse repository at this point
Copy the full SHA 402e188View commit details
Commits on Aug 12, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 7c6bad4 - Browse repository at this point
Copy the full SHA 7c6bad4View commit details
Commits on Aug 17, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 17dc5ed - Browse repository at this point
Copy the full SHA 17dc5edView commit details
Commits on Aug 20, 2024
-
Configuration menu - View commit details
-
Copy full SHA for cb99ce4 - Browse repository at this point
Copy the full SHA cb99ce4View commit details
Commits on Aug 21, 2024
-
Configuration menu - View commit details
-
Copy full SHA for c09dbcd - Browse repository at this point
Copy the full SHA c09dbcdView commit details -
Configuration menu - View commit details
-
Copy full SHA for a1d22d8 - Browse repository at this point
Copy the full SHA a1d22d8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 108f144 - Browse repository at this point
Copy the full SHA 108f144View commit details -
Configuration menu - View commit details
-
Copy full SHA for 23ce160 - Browse repository at this point
Copy the full SHA 23ce160View commit details
Commits on Aug 30, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 0f5eacc - Browse repository at this point
Copy the full SHA 0f5eaccView commit details -
Configuration menu - View commit details
-
Copy full SHA for 118d6a8 - Browse repository at this point
Copy the full SHA 118d6a8View commit details
Commits on Oct 18, 2024
-
Configuration menu - View commit details
-
Copy full SHA for f1084ca - Browse repository at this point
Copy the full SHA f1084caView commit details -
Configuration menu - View commit details
-
Copy full SHA for 046a3dc - Browse repository at this point
Copy the full SHA 046a3dcView commit details