|
1 | 1 | # Copilot Instructions |
2 | 2 |
|
3 | | -All files in the multiflexi/*.app.json directory must conform to the schema available at: https://raw.githubusercontent.com/VitexSoftware/php-vitexsoftware-multiflexi-core/refs/heads/main/multiflexi.app.schema.json |
4 | | - |
5 | 3 | After every single edit to a PHP file, always run `php -l` on the edited file to lint it and ensure code sanity before proceeding further. This is mandatory for all PHP code changes. |
| 4 | + |
| 5 | +## MultiFlexi Specific Guidelines |
| 6 | + |
| 7 | +### Application Configuration (`*.app.json` files) |
| 8 | +- All files `*.app.json` must conform to the schema available at: https://raw.githubusercontent.com/VitexSoftware/php-vitexsoftware-multiflexi-core/refs/heads/main/multiflexi.app.schema.json |
| 9 | +- All files `*.credential-type.json` must conform to the schema available at: https://raw.githubusercontent.com/VitexSoftware/php-vitexsoftware-multiflexi-core/refs/heads/main/multiflexi.credential-type.schema.json |
| 10 | +- Always use schema version 3.0.0 |
| 11 | +- Use `cmdparamsTemplate` with `${VARIABLE}` syntax for placeholders |
| 12 | +- Environment variables must follow the pattern `^[A-Z0-9_]+$` |
| 13 | +- Required fields: `$schema`, `name`, `description`, `executable`, `environment` |
| 14 | +- Use localized strings where appropriate |
| 15 | + |
| 16 | +### Validation |
| 17 | +Please ensure any changes to `*.app.json` files are validated. The MultiFlexi CLI validation command may not be available in all versions: |
| 18 | + |
| 19 | +```bash |
| 20 | +# Try MultiFlexi CLI validation (if available) |
| 21 | +multiflexi-cli application validate-json --file multiflexi/[filename].app.json |
| 22 | + |
| 23 | +# Alternative: Use online JSON schema validator or tools like ajv-cli |
| 24 | +# Install ajv-cli: npm install -g ajv-cli |
| 25 | +# Validate: ajv validate -s schema.json -d multiflexi/[filename].app.json |
| 26 | + |
| 27 | +# Alternative: Manual JSON syntax check |
| 28 | +json_verify < multiflexi/[filename].app.json |
| 29 | +``` |
| 30 | + |
| 31 | +**Note**: The MultiFlexi CLI validation may have issues in some versions. Ensure the JSON is syntactically valid and follows the schema structure manually if validation tools are not working. |
| 32 | + |
| 33 | + |
0 commit comments