Skip to content

Commit a6c9503

Browse files
authored
Minor tweak and comment for DtmiConventions in models repository SDK (Azure#19429)
* Increment changelog with date.
1 parent cd2f75e commit a6c9503

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

sdk/modelsrepository/Azure.Iot.ModelsRepository/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Release History
22

3-
## 1.0.0-preview.1 (Unreleased)
3+
## 1.0.0-preview.1 (2021-03-10)
44

55
### New features
66

sdk/modelsrepository/Azure.Iot.ModelsRepository/src/DtmiConventions.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ public static Uri GetModelUri(string dtmi, Uri repositoryUri, bool expanded = fa
5050
ModelsRepositoryConstants.ExpandedJsonFileExtension);
5151
}
5252

53-
UriBuilder repositoryUriBuilder = new UriBuilder(repositoryUri);
53+
var repositoryUriBuilder = new UriBuilder(repositoryUri);
54+
55+
// If the base URI (repositoryUri in this case) path segment does not end in slash
56+
// that segment will be dropped and not properly anchored to by the intended relative URI.
5457
if (!repositoryUriBuilder.Path.EndsWith("/", StringComparison.InvariantCultureIgnoreCase))
5558
{
5659
repositoryUriBuilder.Path += "/";

0 commit comments

Comments
 (0)