Skip to content

Commit

Permalink
Merge pull request #2226 from spryker/data-exchange-api-igs
Browse files Browse the repository at this point in the history
Updating the Data Exchange IG
  • Loading branch information
lenadoc authored Oct 6, 2023
2 parents 3fa0ca8 + ba6c218 commit ffd7ede
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 498 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ template: feature-integration-guide-template
redirect_from:
- /docs/scos/dev/feature-integration-guides/202304.0/glue-api/data-exchange-api/data-exchange-api-integration.html
- /docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api-integration.html
- docs/scos/dev/feature-integration-guides/202307.0/glue-api/dynamic-data-api/data-exchange-api-integration.html
related:
- title: How to configure Data Exchange API
link: docs/scos/dev/glue-api-guides/page.version/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.html
Expand Down Expand Up @@ -165,6 +166,108 @@ class DynamicEntityGuiConfig extends SprykerDynamicEntityGuiConfig
}
```

### Configure Dynamic Data installation

1. Optional: To set the default configuration data, create a configuration file:

<details open><summary markdown='span'>src/Pyz/Zed/DynamicEntity/data/installer/configuration.json</summary>

```json
[
{
"tableName": "spy_country",
"tableAlias": "countries",
"isActive": true,
"definition": {
"identifier": "id_country",
"fields": [
{
"fieldName": "id_country",
"fieldVisibleName": "id_country",
"isCreatable": true,
"isEditable": true,
"type": "integer",
"validation": { "isRequired": false }
},
{
"fieldName": "iso2_code",
"fieldVisibleName": "iso2_code",
"isCreatable": true,
"isEditable": true,
"type": "string",
"validation": { "isRequired": true }
},
{
"fieldName": "iso3_code",
"fieldVisibleName": "iso3_code",
"isCreatable": true,
"isEditable": true,
"type": "string",
"validation": { "isRequired": false }
},
{
"fieldName": "name",
"fieldVisibleName": "name",
"isCreatable": true,
"isEditable": true,
"type": "string",
"validation": { "isRequired": false }
},
{
"fieldName": "postal_code_mandatory",
"fieldVisibleName": "postal_code_mandatory",
"isCreatable": true,
"isEditable": true,
"type": "string",
"validation": { "isRequired": false }
},
{
"fieldName": "postal_code_regex",
"fieldVisibleName": "postal_code_regex",
"isCreatable": true,
"isEditable": true,
"type": "string",
"validation": { "isRequired": false }
}
]
}
}
]
```
</details>
2. Add the path to the configuration file, to `DynamicEntityConfig`:

**src/Pyz/Zed/DynamicEntity/DynamicEntityConfig.php**

```php
<?php
/**
* This file is part of the Spryker Suite.
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
namespace Pyz\Zed\DynamicEntity;
use Spryker\Zed\DynamicEntity\DynamicEntityConfig as SprykerDynamicEntityConfig;
class DynamicEntityConfig extends SprykerDynamicEntityConfig
{
/**
* @var string
*/
protected const CONFIGURATION_FILE_PATH = '%s/src/Pyz/Zed/DynamicEntity/data/installer/configuration.json';
/**
* @return string
*/
public function getInstallerConfigurationDataFilePath(): string
{
return sprintf(static::CONFIGURATION_FILE_PATH, APPLICATION_ROOT_DIR);
}
}
```

### Set up database schema and transfer objects

1. Apply database changes and generate entity and transfer changes:
Expand Down
Loading

0 comments on commit ffd7ede

Please sign in to comment.