finos / legend

The Legend project

Home Page:https://legend.finos.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is it possible to import a json schema file into the Legend model to create the class with attributes and data types?

szymonzabiello opened this issue · comments

Before asking a question

  1. Review Legend documentation and frequently asked questions
  2. Search existing issues since someone might have already asked a similar question.

Ask a question

Is it possible to import a json schema file into the Legend model to create the class with attributes and data types?

Boot Studio, have blank project, click on open model importer, select JSON. Can be used to bootstrap data model.

Answer from: April 19, 2023 Legend Office Hours

User journey #3: Generate model schema
Question Issue: #644 Is it possible to import a json schema file into the Legend model to create the class with attributes and data types?

Yes, there is an import function in the studio that works with schema.
Go to the studio, delete all content then open the model importer, where you will see the options that you can access from such as JSON, Flat Data, and XSD. You will then add the schema and it will translate the schema into the target system.

Follow-Up Question: Can we put our extra JSON message here?

Yes, on schema.

Follow-Up Question: Is there example code for how we can specify the JSON schema?

You can take any schema and if you have the classes, you do the inverse and ask to show the JSON schema.

Documentation:
Generate model schema user journey