[CHKO] category and class must contain valid values#746
Conversation
There was a problem hiding this comment.
Pull request overview
Adds stricter validation for CHKO “category” and “implementing class” fields to reject empty values, lowercase, and unexpected characters, aligning the CHKO file format with expected ABAP naming constraints.
Changes:
- Added
$patternannotations forcategoryandimplementing_classinzif_aff_chko_v1(ABAP interface metadata). - Updated the generated JSON schema (
chko-v1.json) to include the samepatternconstraints forcategoryandimplementingClass.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| file-formats/chko/type/zif_aff_chko_v1.intf.abap | Adds regex-based constraints via $pattern for CHKO name-like fields. |
| file-formats/chko/chko-v1.json | Enforces the same constraints at JSON schema level for CHKO consumers/validators. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Did you have CHKO specifically in mind? If we want to add the pattern, I am wondering whether we should add it to @SAP/abap-file-formats-team What do you think? |
|
If the pattern is used for validate input in Eclipse UIs, then this is bad and this will break. |
Why would be a validation of the schema be bad? Do you have unspecific error message in mind? Or that input is limited (as we had it for a while for numerics)? |
|
Had a brief chat with @wurzka and we think the JSON Schema pattern feature can be used. So, we can (maybe should) make the JSON Schema more specific. |

don't allow empty values or lower case or strange characters