GitBook: [#60] Updating Document for Json Schema to Typescript Types generation. (#1535)

This commit is contained in:
Sachin Chaurasiya 2021-12-03 16:01:06 +05:30 committed by GitHub
parent 16d8ba548d
commit a094f1d5f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -123,4 +123,4 @@
* [BulkSink](open-source-community/developer/build-a-connector/bulksink.md) * [BulkSink](open-source-community/developer/build-a-connector/bulksink.md)
* [Run Integration Tests](open-source-community/developer/run-integration-tests.md) * [Run Integration Tests](open-source-community/developer/run-integration-tests.md)
* [UX Style Guide](open-source-community/developer/ux-style-guide.md) * [UX Style Guide](open-source-community/developer/ux-style-guide.md)
* [Generate typescript types from JSON schema](open-source-community/developer/generate-typescript-types-from-json-schema.md) * [Generate Typescript Types From JSON Schema](open-source-community/developer/generate-typescript-types-from-json-schema.md)

View File

@ -4,17 +4,17 @@ description: >-
schema. schema.
--- ---
# Generate typescript types from JSON schema # Generate Typescript Types From JSON Schema
We are using [quicktype](https://quicktype.io) to generate types from JSON Schema. We are using [quicktype](https://quicktype.io) to generate types from JSON Schema.
Install quicktype dependency globally using npm Make sure you have `quicktype` installed if not then install it using command given below from `openmetadata` root folder.
``` ```
npm install -g quicktype npm install
``` ```
Now go to the UI folder `src/main/resources/ui` and from there run the command given below. Now go to the UI folder `openmetadata-ui/src/main/resources/ui` and from there run the command given below.
``` ```
npm run json2ts npm run json2ts
@ -22,4 +22,4 @@ npm run json2ts
The above command will take some time to execute and generate types. The above command will take some time to execute and generate types.
After that, you can go to the generated `src/main/resources/ui/src/generated/*` folder and see the all generated types. After that, you can go to the generated `openmetadata-ui/src/main/resources/ui/src/generated/*` folder and see the all generated types.