Importing Schemas
Instead of defining a manifest and its entities manually, Negroni can generate them by importing an external schema. This is useful when migrating existing data models or bootstrapping a manifest from an API specification or database.
Import Methods
| Method | Source |
|---|---|
| CDM Manifest | A CDM-format JSON manifest file |
| Database Schema | A live connection to an existing database |
| OpenAPI 3.0 | An OpenAPI 3.0 specification file |
| Swagger 2.0 | A Swagger 2.0 specification file |
| Postman Collection | A Postman collection export file |
Access all import options from the toolbar by clicking Import or via the
manifest Navigator's right-click context menu.
Importing a CDM Manifest
- Click
Import on the toolbar and select CDM Manifest.
- Upload or paste the CDM manifest JSON file.
- Review the entities and manifest details detected from the file.
- Click Import to create the manifest and its entities.
Importing from a Database Schema
- Click
Import on the toolbar and select Database Schema.
- On the next step, choose one of two methods:
Connect to Database
Use this option to discover schemas directly from a live database connection.
Supported database types:
- PostgreSQL
- MySQL
- Cassandra
- MongoDB
Steps:
- Select the Connect to Database tab.
- Choose the Connection Type and enter the connection details:
- Host, port, database name, username, and password
- For Cassandra: Keyspace and Contact Points
- Optionally, provide a Connection String to override host/port/database
- Click Test Connection to verify the connection before proceeding.
- Click Next. Negroni reads the database schema and displays the available schemas.
- Select the schemas to import as entities.
- Click Import to generate a manifest.
Import Schema
Use this option to import a database schema from a file previously exported by Negroni (for example, a generated database schema export).
Supported file types: .zip, .sql
Steps:
- Select the Import Schema tab.
- Upload or drag and drop a
.zipor.sqlschema file. - Click Import to generate a manifest.
Importing from an OpenAPI 3.0 Specification
- Click
Import on the toolbar and select OpenAPI Schema.
- Upload or paste the OpenAPI 3.0 specification.
- Click Import.
Importing from a Swagger 2.0 Specification
- Click
Import on the toolbar and select Swagger Schema.
- Upload or paste the Swagger 2.0 specification.
- Click Import.
Importing from a Postman Collection
- Click
Import on the toolbar and select Postman Collection.
- Upload the collection JSON.
- Click Import.
After Importing
- Add/modify entities
- Configure build settings
- Export as Martini package / CDM schema / database schema