.. _schema_attributes: ******************************* Schema Attributes ******************************* Here's the list of attributes that affect Schema generation. +----------------+-----------------+-------------+------------------+----------------------------------+----------------+ | Attribute | Type | Inheritance | Target | Description | Default | +================+=================+=============+==================+==================================+================+ | enabled | **bool** | | | module, | | Enables schema generation for | ``false`` | | | | | | type | | the module or type. | | +----------------+-----------------+-------------+------------------+----------------------------------+----------------+ | ignore | **bool** | | record field | Exclude field from schema | ``false`` | +----------------+-----------------+-------------+------------------+----------------------------------+----------------+ | name | **string** | | type | Override type name | | +----------------+-----------------+-------------+------------------+----------------------------------+----------------+ | root | **bool** | | | variant | | Marks type as root document | ``false`` | | | | | | | type | | +----------------+-----------------+-------------+------------------+----------------------------------+----------------+ | group | **string** | | | record | Category group | | | | | | | variant | | | +----------------+-----------------+-------------+------------------+----------------------------------+----------------+ The following attributes describe value editors. They are all valid both on types and record fields and support :ref:`attribute_type_inheritance`. +------------------------+----------------+-------------+------------------------------------------+----------------+ | Attribute | Type | Editor Type | Description | Default | +========================+================+=============+==========================================+================+ | editor | DescriptorKind | | Override default editor | | +------------------------+----------------+-------------+------------------------------------------+----------------+ | multiline | **bool** | string | Is text editor multiline? | ``false`` | +------------------------+----------------+-------------+------------------------------------------+----------------+ | compact | **bool** | record | Enable compact view for record | ``false`` | +------------------------+----------------+-------------+------------------------------------------+----------------+ | not_empty | **bool** | string | Consider empty values as invalid | ``false`` | +------------------------+----------------+-------------+------------------------------------------+----------------+ | category | **string** | key | | Only allow document keys of | | | | | | | the certain category | | +------------------------+----------------+-------------+------------------------------------------+----------------+ | interface | **string** | key | | Only allow document keys of | | | | | | | documents implementing this | | | | | | | interface | | +------------------------+----------------+-------------+------------------------------------------+----------------+ | source | **string** | string | | Allow a fixed set of values, | | | | | | | stored at path. Attribute value | | | | | | | has ``document_name.json_path`` | | | | | | | format | | +------------------------+----------------+-------------+------------------------------------------+----------------+ | editor_key | **string** | any | | Use a custom editor, described | | | | | | | by the document with the given | | | | | | | name | | +------------------------+----------------+-------------+------------------------------------------+----------------+ | min | **integer** | | integer | Set minimum allowed value | | | | | | float | | | +------------------------+----------------+-------------+------------------------------------------+----------------+ | max | **integer** | | integer | Set maximum allowed value | | | | | | float | | | +------------------------+----------------+-------------+------------------------------------------+----------------+ | path | **bool** | path(string)| Is text editor a file path editor | | +------------------------+----------------+-------------+------------------------------------------+----------------+ | path.root | **string** | path | | Path prefix appended to the repository | | | | | | | root (not included into result value) | | +------------------------+----------------+-------------+------------------------------------------+----------------+ | path.default | **string** | path | | Default folder path hint for file | | | | | | | picker dialogs | | +------------------------+----------------+-------------+------------------------------------------+----------------+ | path.extension | **string** | path | Supported file extension | | +------------------------+----------------+-------------+------------------------------------------+----------------+ | path.include_extension | **string** | path | | Whether to include extension into | | | | | | | result value | | +------------------------+----------------+-------------+------------------------------------------+----------------+ | meta | **object** | any | Custom metadata. See :ref:`schema_meta` | | +------------------------+----------------+-------------+------------------------------------------+----------------+