Skip to content

Commit

Permalink
Update DELTA.md
Browse files Browse the repository at this point in the history
  • Loading branch information
reuvenharrison committed Feb 26, 2024
1 parent 5f540f2 commit e4f5419
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions DELTA.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,30 @@ oasdiff delta base.yaml revision.yaml

### The distance between identical specs is 0
The minimum distance, 0, respresnts the distance between specifications with identical endpoints.
For example, the distance between any spec to itself is 0:
The distance between any spec to itself is 0:
```
oasdiff delta spec.yaml spec.yaml
```

### The distance between disjoint specs is 1
The maximum distance, 1, respresnts the distance between specifications with no common endpoints.
For example, the distance between a spec with no endpoints and another spec with one or more endpoints is 1:
The distance between a spec with no endpoints and another spec with one or more endpoints is 1:
```
oasdiff delta empty-spec.yaml non-empty-spec.yaml
```


### Symmetric mode
By default, delta is symmetric and takes into account both elements of base that are deleted in revision and elements of base that are added in revision.
For example, the symmetric distance between any two specs is the same regardless of the order of the given specs:
The symmetric distance between any two specs is the same regardless of the order of the given specs:
```
oasdiff delta base.yaml revision.yaml
oasdiff delta revision.yaml base.yaml
```

### Asymmetric mode
It is also possible to calculate an asymmetric distance which takes into account elements of base that were deleted in revision but ignores elements that are missing in base and were added in revision.
For examples, for any two specs the sum of the asymmetric distances is their symmetric distance:
For any two specs the sum of the asymmetric distances is their symmetric distance:
```
oasdiff delta base.yaml revision.yaml --asymmetric
oasdiff delta revision.yaml base.yaml --asymmetric
Expand Down

0 comments on commit e4f5419

Please sign in to comment.