Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DMR - Update documentation and enable pipelines #20064

Merged
merged 13 commits into from
Mar 23, 2021
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### New features

- N/A
- Initial preview of Azure Models Repository SDK

### Breaking changes

Expand Down
39 changes: 39 additions & 0 deletions sdk/modelsrepository/azure-iot-modelsrepository/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Azure IoT Models Repository client library for Java

This library provides functionality for interacting with the [Azure IoT Models Repository][modelsrepository_iot_endpoint]. It also aims to provide a consistent experience working with digital twin model repositories following Azure IoT conventions.

[Source code][source]

## Getting started

The complete Microsoft Azure SDK can be downloaded from the [Microsoft Azure downloads][microsoft_sdk_download] page, and it ships with support for building deployment packages, integrating with tooling, rich command line tooling, and more.
Expand All @@ -8,16 +12,45 @@ For the best development experience, developers should use the official Microsof

### Include the Package

[//]: # ({x-version-update-start;com.azure:azure-iot-modelsrepository;current})

```xml
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-iot-modelsrepository</artifactId>
<version>1.0.0-beta.1</version>
</dependency>
```
[//]: # ({x-version-update-end})

### Prerequisites

- A models repository following [Azure IoT conventions][modelsrepository_conventions]
- The models repository can be located on the local filesystem or hosted on a webserver.
- Azure IoT hosts the global [Azure IoT Models Repository][modelsrepository_iot_endpoint] which the client will point to by default if no URI is provided.

### Authenticate the Client

Currently no authentication mechanisms are supported in the client. The global endpoint is not tied to an Azure subscription and does not support auth. All models published are meant for anonymous public consumption.

## Key concepts

The Azure IoT Models Repository enables builders to manage and share digital twin models. The models are [JSON-LD][json_ld_reference] documents defined using the Digital Twins Definition Language ([DTDL][dtdlv2_reference]).

The repository defines a pattern to store DTDL interfaces in a directory structure based on the Digital Twin Model Identifier (DTMI). You can locate an interface in the repository by converting the DTMI to a relative path. For example, the DTMI "`dtmi:com:example:Thermostat;1`" translates to `/dtmi/com/example/thermostat-1.json`.

## Examples

You can familiarize yourself with the client using [samples for IoT Models Repository][modelsrepository_samples].

## Troubleshooting

All events and errors that surface from the service calls will be logged with the ClientLogger.

## Next steps

See implementation examples with our [code samples][modelsrepository_samples].

## Contributing

This project welcomes contributions and suggestions.
Expand All @@ -34,3 +67,9 @@ For more information see the Code of Conduct FAQ or contact opencode@microsoft.c
<!-- LINKS -->
[microsoft_sdk_download]: https://azure.microsoft.com/downloads/?sdk=net
[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/
[modelsrepository_iot_endpoint]: https://devicemodels.azure.com/
[source]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/modelsrepository/azure-iot-modelsrepository/src
[modelsrepository_conventions]: https://github.com/Azure/iot-plugandplay-models-tools/wiki
[json_ld_reference]: https://json-ld.org
[dtdlv2_reference]: https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/dtdlv2.md
[modelsrepository_samples]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/modelsrepository/azure-iot-modelsrepository/src/samples