Skip to main content

Model properties

Models properties can be declared in .yml files in your models/ directory (as defined by the model-paths config).

You can name these files whatever_you_want.yml, and nest them arbitrarily deeply in subfolders within the models/ directory.

models/<filename>.yml
version: 2

models:
- name: <model name>
meta:
jinjat:
schema:
x-pk: customer_id
columns:
- name: <column_name> # required
meta:
jinjat:
schema:
- name: ... # declare properties of additional columns

The JSON Schema defined for both columns and models will be part of the OpenAPI schema.

0