|
| 1 | +== Format structure |
| 2 | + |
| 3 | +The EXPRESS Changes YAML format follows this basic structure: |
| 4 | + |
| 5 | +[source,yaml] |
| 6 | +---- |
| 7 | +path: String (required) |
| 8 | + # Relative path to the EXPRESS file |
| 9 | +changes: |
| 10 | + - type: String (required) |
| 11 | + # Type of change: add, remove, modify |
| 12 | + entity: String (required) |
| 13 | + # Name of the entity being changed |
| 14 | + details: String (required) |
| 15 | + # Description of the change |
| 16 | + original: String (optional) |
| 17 | + # Original content (for modify/remove) |
| 18 | + new: String (optional) |
| 19 | + # New content (for add/modify) |
| 20 | +---- |
| 21 | + |
| 22 | +== Change types |
| 23 | + |
| 24 | +=== Add |
| 25 | + |
| 26 | +Used when adding new elements to the schema. |
| 27 | + |
| 28 | +.Example |
| 29 | +[example] |
| 30 | +==== |
| 31 | +[source,yaml] |
| 32 | +---- |
| 33 | +path: data/schema.exp |
| 34 | +changes: |
| 35 | + - type: add |
| 36 | + entity: PERSON |
| 37 | + details: Add new entity for representing individuals |
| 38 | + new: | |
| 39 | + ENTITY PERSON; |
| 40 | + name: STRING; |
| 41 | + age: INTEGER; |
| 42 | + END_ENTITY; |
| 43 | +---- |
| 44 | +==== |
| 45 | + |
| 46 | +=== Remove |
| 47 | + |
| 48 | +Used when removing elements from the schema. |
| 49 | + |
| 50 | +.Example |
| 51 | +[example] |
| 52 | +==== |
| 53 | +[source,yaml] |
| 54 | +---- |
| 55 | +path: data/schema.exp |
| 56 | +changes: |
| 57 | + - type: remove |
| 58 | + entity: OBSOLETE_TYPE |
| 59 | + details: Remove deprecated type definition |
| 60 | + original: | |
| 61 | + TYPE OBSOLETE_TYPE = INTEGER; |
| 62 | + END_TYPE; |
| 63 | +---- |
| 64 | +==== |
| 65 | + |
| 66 | +=== Modify |
| 67 | + |
| 68 | +Used when modifying existing elements. |
| 69 | + |
| 70 | +.Example |
| 71 | +[example] |
| 72 | +==== |
| 73 | +[source,yaml] |
| 74 | +---- |
| 75 | +path: data/schema.exp |
| 76 | +changes: |
| 77 | + - type: modify |
| 78 | + entity: PERSON |
| 79 | + details: Add email attribute to PERSON entity |
| 80 | + original: | |
| 81 | + ENTITY PERSON; |
| 82 | + name: STRING; |
| 83 | + END_ENTITY; |
| 84 | + new: | |
| 85 | + ENTITY PERSON; |
| 86 | + name: STRING; |
| 87 | + email: STRING; |
| 88 | + END_ENTITY; |
| 89 | +---- |
| 90 | +==== |
| 91 | + |
| 92 | +== Validation rules |
| 93 | + |
| 94 | +1. The `path` field must be a valid relative path to an EXPRESS file |
| 95 | +2. Each change must have a `type`, `entity`, and `details` field |
| 96 | +3. `original` is required for `remove` and `modify` types |
| 97 | +4. `new` is required for `add` and `modify` types |
| 98 | +5. Multiple changes can be specified for the same file |
| 99 | + |
| 100 | +== Usage guidelines |
| 101 | + |
| 102 | +1. Keep change descriptions clear and specific |
| 103 | +2. Include context in the details field |
| 104 | +3. Maintain proper EXPRESS syntax in original/new content |
| 105 | +4. Use consistent indentation in YAML structure |
0 commit comments