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

[AutoPR @azure-rest/purview-datamap] Changed datamap endpoint from string to url #13397

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 5 additions & 7 deletions sdk/purview/purview-datamap-rest/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
## Release History
# Release History

## 1.0.0 (2025-01-22)

### 1.0.0-beta.2 (2024-12-16)
### Features Added

#### Features Added
- refresh @azure-rest/purview-datamap sdk

### 1.0.0-beta.1 (2024-03-04)
- Initial Release
The package of @azure-rest/purview-datamap is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart).
21 changes: 21 additions & 0 deletions sdk/purview/purview-datamap-rest/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2025 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
43 changes: 6 additions & 37 deletions sdk/purview/purview-datamap-rest/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Azure PurviewDataMap REST client library for JavaScript

Microsoft Purview Data Map provides the foundation for data discovery and data governance. Microsoft Purview Data Map is a cloud native PaaS service that captures metadata about enterprise data present in analytics and operation systems on-premises and cloud. Azure PurviewDataMap client provides a set of APIs in Purview Data Map Data Plane. For a full list of APIs, please refer to [Data Map API](https://learn.microsoft.com/rest/api/purview/datamapdataplane/operation-groups?view=rest-purview-datamapdataplane-2023-09-01).
Purview Data Map Service is a fully managed cloud service whose users can
discover the data sources they need and understand the data sources they find.
At the same time, Data Map helps organizations get more value from their
existing investments. This spec defines REST API of Purview Data Map Service.

**Please rely heavily on our [REST client docs](https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/rest-clients.md) to use this library**

Expand All @@ -9,7 +12,6 @@ Key links:
- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/purview/purview-datamap-rest)
- [Package (NPM)](https://www.npmjs.com/package/@azure-rest/purview-datamap)
- [API reference documentation](https://learn.microsoft.com/javascript/api/@azure-rest/purview-datamap?view=azure-node-preview)
- [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/purview/purview-datamap-rest/samples)

## Getting started

Expand All @@ -35,52 +37,19 @@ To use an [Azure Active Directory (AAD) token credential](https://github.com/Azu
provide an instance of the desired credential type obtained from the
[@azure/identity](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials) library.

To authenticate with AAD, you must first `npm` install [`@azure/identity`](https://www.npmjs.com/package/@azure/identity)
To authenticate with AAD, you must first `npm` install [`@azure/identity`](https://www.npmjs.com/package/@azure/identity)

After setup, you can choose which type of [credential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials) from `@azure/identity` to use.
As an example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential)
can be used to authenticate the client.

Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables:
AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET

## Examples

The following sections provide several code snippets covering some of the most common Purview DataMap scenarios, including:

- [Get All Type Definitions](#get-all-type-definitions)

### Get All Type Definitions

```typescript
import PurviewDataMap from "@azure-rest/purview-datamap";
import { DefaultAzureCredential } from "@azure/identity";
import { isUnexpected } from "@azure-rest/purview-datamap";
import "dotenv/config";

const endpoint = process.env["ENDPOINT"] || "";

async function main() {
console.log("== List entity typedefs sample ==");
const client = PurviewDataMap(endpoint, new DefaultAzureCredential());

const result = await client.path("/atlas/v2/types/typedefs").get();

if (isUnexpected(result)) {
throw result;
}
}

main().catch(console.error);
```

## Troubleshooting

### Logging

Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:

```ts
```javascript
const { setLogLevel } = require("@azure/logger");

setLogLevel("info");
Expand Down
6 changes: 3 additions & 3 deletions sdk/purview/purview-datamap-rest/api-extractor.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "dist/esm/index.d.ts",
"mainEntryPointFilePath": "./dist/esm/index.d.ts",
"docModel": {
"enabled": true
},
Expand All @@ -11,7 +11,7 @@
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "",
"publicTrimmedFilePath": "dist/purview-datamap.d.ts"
"publicTrimmedFilePath": "./types/purview-datamap.d.ts"
},
"messages": {
"tsdocMessageReporting": {
Expand All @@ -28,4 +28,4 @@
}
}
}
}
}
6 changes: 0 additions & 6 deletions sdk/purview/purview-datamap-rest/assets.json

This file was deleted.

6 changes: 6 additions & 0 deletions sdk/purview/purview-datamap-rest/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
"@azure/azure-sdk/ts-apiextractor-json-types": "warn",
"@azure/azure-sdk/ts-package-json-types": "warn",
"@azure/azure-sdk/ts-package-json-engine-is-present": "warn",
"@azure/azure-sdk/ts-package-json-module": "off",
"@azure/azure-sdk/ts-package-json-files-required": "off",
"@azure/azure-sdk/ts-package-json-main-is-cjs": "off",
"tsdoc/syntax": "warn",
},
},
Expand Down
Loading
Loading