Amplication Code gen types
Amplication Code gen types is the component that defines the shared data structures used by the amplication packages.
Usage
Get properties schema for entity field data type
import { getSchemaForDataType } from "@amplication/code-gen-types";
getSchemaForDataType(EnumDataType.SingleLineText);
Get type of data type properties
import { types } from "@amplication/code-gen-types";
const lookupProperties: types.Lookup = {
relatedEntityId: "exampleId",
allowMultipleSelection: false,
};
Technologies
- TypeScript: the data code is strictly typed with TypeScript.
- JSON Schema: the data schemas in the package are defined using JSON Schema.
- Jest: is used for testing.
Development
:bulb: Before you begin, make sure you have all the below installed:
One time set up
After cloning the repository open its root directory and run the following commands:
Workflow
Make sure you are in the data directory (packages/amplication-data
).
Once you are done making changes, run the following commands: