check the difference in text format
Overview
Differences may be checked in text format outside of Next Design, such as when checking a pull request.
The text is saved in JSON format. This section describes the JSON format notation method and how to display differences.
info
See here for notes on saving in JSON format.
Model notation and reading in JSON format
Models and associations are recorded. Each element is roughly composed of the following elements.
JSON format notation example of model
//Example of use case "Adaptive driving"
{
"Id": "dfeab440-43ff-47d3-aec0-887e82b5e746",
"EntityType": "Entity",
"Name": "Adaptive run (ADAPTIVE)",
"MetamodelId": "122fabe8-c00b-422d-be66-59e86fd79d1b",
"Metamodel": "Use case",
"Fields": {
"Name": "Adaptive run (ADAPTIVE)",
"Description": "Driving while maintaining the following distance from the preceding vehicle.",
}
},
Id
- indicates the ID of the model. It can be used to search for a target with an error or to search for related reference destinations.
EntityType
- Indicates model type. The values are as follows.
- Model -
Entity
- Interaction model elements - such as
Lifeline
- Model -
- Indicates model type. The values are as follows.
Name
- indicates the name of the model.
MetamodelId
- Indicates the id of the model's metamodel.
Metamodel
- Indicates the metamodel name of the model.
Fields
- Denotes model field names and their values.
- Only fields with values are recorded.
Relevant JSON format notation example
//Example of association from use case "ADAPTIVE" to any actor
{
"Id": "0299e2b0-2b44-47c0-b808-41ddcf643933",
"RelationType": "Ref",
"MetamodelId": "3a058d5b-880b-4d67-ab54-6e40f2c8a40d",
"Metamodel": "Primary Actor Association",
"SourceId": "dfeab440-43ff-47d3-aec0-887e82b5e746",
"TargetId": "68f71941-4a9d-4ee0-afef-376c2b601f27"
},
Id
- indicates the ID of the association.
RelationType
- Indicates the type of association. The values are as follows.
Embed
- ownership associationRef
- reference association
- Indicates the type of association. The values are as follows.
MetamodelId
- Indicates the ID of the associated metamodel.
Metamodel
- Indicates the metamodel name of the association.
SourceId
- Indicates the ID of the related model.
TargetId
- Indicates the ID of the associated model.
show diff
The difference display method varies depending on the Git client, but basically the differences are displayed in orange or red before changes, and in yellow or green after changes.
info
- Next Design records field names and values side by side.
- Fields with unset values are not saved.
Change field value
- The difference between the values before and after the change is displayed on the corresponding line.
- In the case of relocation of related reference destinations/reference sources, the values of the
SourceId
andTargetId
fields are updated and displayed with differences.
Adding elements
- The entire text of the newly added element will be diffed.
Delete element
- When deleting an element, the entire text is displayed with a difference on the screen before the change, and is displayed blank on the screen after the change.
- It will be displayed in the same way even if you replace it with the parent element of another model file.
Reorder elements
- If saved as a structure, the elements that have had their order changed are displayed with differences (above).
- At this time, if there is no difference in the same text, it will not be displayed as there is a difference.
- If not stored structured, only the
SourceIndex
field will be updated and displayed with diffs.- The
SourceIndex
field is a field that indicates the order of elements in a field that can hold multiple elements. It will be saved in the file if not structured and saved. - If you want to intuitively grasp the order by the order of the model instead of the
SourceIndex
field, please set to save structured.
- The
- See here for structured storage.
info
- For text format, profile diffs are also displayed. Based on the above display contents, it is possible to visually confirm the difference.