Skip to content

Commit

Permalink
fix: change url to uri (#104)
Browse files Browse the repository at this point in the history
* fix: change `url` to `uri`

* chore: update changelog
  • Loading branch information
nanderstabel committed Aug 7, 2024
1 parent 560a20f commit 47f4f82
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 8 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
### 07-08-2024
- Renamed the display `url` property in the `credential_configurations` in the Configuration to `uri`, e.g.:
```yaml
# agent_application/config.yaml
credential_configurations:
- credential_configuration_id: w3c_vc_credential
format: jwt_vc_json
credential_definition:
type:
- VerifiableCredential
display:
- name: Verifiable Credential
locale: en
logo:
# The property below has been renamed from `url` to `uri`
uri: https://www.impierce.com/external/impierce-logo.png
alt_text: UniCore Logo
```
### 29-07-2024
- Renamed env variable prefix from `AGENT` to `UNICORE`.
- Refactored the environment variables separators from `_` to `__` to support nested configuration values. As an example, `AGENT_LOG_FORMAT` now becomes `UNICORE__LOG_FORMAT`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ mod tests {
"name": "Verifiable Credential",
"locale": "en",
"logo": {
"url": "https://impierce.com/images/logo-blue.png",
"uri": "https://impierce.com/images/logo-blue.png",
"alt_text": "UniCore Logo"
}
})],
Expand All @@ -120,7 +120,7 @@ mod tests {
"name": "UniCore",
"locale": "en",
"logo": {
"url": "https://impierce.com/images/favicon/apple-touch-icon.png",
"uri": "https://impierce.com/images/favicon/apple-touch-icon.png",
"alt_text": "UniCore Logo"
}
})]),
Expand Down
2 changes: 1 addition & 1 deletion agent_application/example.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ credential_configurations:
- name: Verifiable Credential
locale: en
logo:
url: https://www.impierce.com/external/impierce-logo.png
uri: https://www.impierce.com/external/impierce-logo.png
alt_text: UniCore Logo

# Key configuration (temporary)
Expand Down
4 changes: 1 addition & 3 deletions agent_shared/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ pub struct CredentialConfiguration {
#[skip_serializing_none]
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Logo {
// TODO: remove this alias and change field to `uri`.
#[serde(alias = "uri")]
pub url: Option<Url>,
pub uri: Option<Url>,
pub alt_text: Option<String>,
}

Expand Down
2 changes: 1 addition & 1 deletion agent_shared/tests/test-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ credential_configurations:
- name: Verifiable Credential
locale: en
logo:
url: https://impierce.com/images/logo-blue.png
uri: https://impierce.com/images/logo-blue.png
alt_text: UniCore Logo

secret_manager:
Expand Down
2 changes: 1 addition & 1 deletion agent_verification/src/services.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ impl VerificationServices {
let logo_uri = config()
.display
.first()
.and_then(|display| display.logo.as_ref().and_then(|logo| logo.url.clone()));
.and_then(|display| display.logo.as_ref().and_then(|logo| logo.uri.clone()));

let signing_algorithms_supported: Vec<Algorithm> = config()
.signing_algorithms_supported
Expand Down

0 comments on commit 47f4f82

Please sign in to comment.