Skip to content

Commit

Permalink
chore: align framework agreement right operand to PascalCase (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
wolf4ood authored May 15, 2024
1 parent 09527f1 commit 238c91a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion cx/policy/samples/policy.sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"constraint": {
"leftOperand": "FrameworkAgreement",
"operator": "eq",
"rightOperand": "pcf:1.0.0"
"rightOperand": "Pcf:1.0.0"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion cx/policy/samples/policy.sample.playground.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"constraint": {
"leftOperand": "FrameworkAgreement",
"operator": "eq",
"rightOperand": "pcf"
"rightOperand": "Pcf"
}
}
}
Expand Down
14 changes: 7 additions & 7 deletions cx/policy/specs/policy.definitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ The PCF framework agreement is expressed as:
"constraint": {
"leftOperand": "FrameworkAgreement",
"operator": "eq",
"rightOperand": "pcf:[version]"
"rightOperand": "Pcf:[version]"
}
}
```
Expand All @@ -167,7 +167,7 @@ The Sustainability framework agreement is expressed as:
"constraint": {
"leftOperand": "FrameworkAgreement",
"operator": "eq",
"rightOperand": "sustainability:[version]"
"rightOperand": "Sustainability:[version]"
}
}
```
Expand All @@ -181,7 +181,7 @@ The Quality framework agreement is expressed as:
"constraint": {
"leftOperand": "FrameworkAgreement",
"operator": "eq",
"rightOperand": "quality:[version]"
"rightOperand": "Quality:[version]"
}
}
```
Expand All @@ -195,7 +195,7 @@ The Resiliency framework agreement is expressed as:
"constraint": {
"leftOperand": "FrameworkAgreement",
"operator": "eq",
"rightOperand": "resiliency:[version]"
"rightOperand": "Resiliency:[version]"
}
}
```
Expand All @@ -209,7 +209,7 @@ The Traceability framework agreement is expressed as:
"constraint": {
"leftOperand": "FrameworkAgreement",
"operator": "eq",
"rightOperand": "traceability:[version]"
"rightOperand": "Traceability:[version]"
}
}
```
Expand All @@ -223,7 +223,7 @@ The Behavior framework agreement is expressed as:
"constraint": {
"leftOperand": "FrameworkAgreement",
"operator": "eq",
"rightOperand": "behavioraltwin:[version]"
"rightOperand": "BehavioralTwin:[version]"
}
}
```
Expand Down Expand Up @@ -298,7 +298,7 @@ an active signed traceability agreement:
{
"leftOperand": "FrameworkAgreement",
"operator": "eq",
"rightOperand": "traceability"
"rightOperand": "Traceability"
}
]
}
Expand Down
8 changes: 4 additions & 4 deletions cx/policy/specs/policy.mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,20 @@ Please check the syntax [here](./policy.definitions.md)
Automatic mapping policy constraint expressions to credential type is possible assuming all framework credentials follow
the same schema. Assuming that is the case, the evaluation of the policy (= the evaluation function) can be generic.

In an example a policy constraint requiring the "pcf" credential in version 0.4.2, would look like this:
In an example a policy constraint requiring the "Pcf" credential in version 0.4.2, would look like this:

```json
{
"constraint": {
"leftOperand": "FrameworkAgreement",
"operator": "eq",
"rightOperand": "pcf:0.4.2"
"rightOperand": "Pcf:0.4.2"
}
}
```

If a specific contract version is referenced in the policy constraint, like in the example above, it follows that the
policy **must be updated**, if version `0.4.3` of the `pcf` credential is released, and the policy should reference it.
policy **must be updated**, if version `0.4.3` of the `Pcf` credential is released, and the policy should reference it.

If no contract version is specified in the policy constraint, then the policy **need not be updated**.

Expand All @@ -70,7 +70,7 @@ In order to reconstruct the actual credential type, which in the example would b
simple String manipulation:

- remove `FrameworkAgreement`. Hint: use it to trigger the transformation.
- capitalize the right-operand (i.e. `pcf --> Pcf`)
- capitalize the right-operand if necessary (i.e. `pcf --> Pcf`)
- append the `Credential` literal

Formally, that transformation must adhere to the following EBNF:
Expand Down

0 comments on commit 238c91a

Please sign in to comment.