Skip to content

[AutoPR @azure-rest/contosowidgetmanager-rest] Dw/test cadl project sample4 #1859

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

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
fc7d10f
save
dw511214992 Jun 7, 2022
6c83e53
save new autorest config file in sdk repo
dw511214992 Jun 9, 2022
457b581
Update automation_generate.sh
dw511214992 Jun 10, 2022
59e0ea1
Update automation_generate.sh
dw511214992 Jun 13, 2022
1f2f00b
Update swagger_to_sdk_config.json
dw511214992 Jul 14, 2022
b58dbe1
Update swagger_to_sdk_config.json
dw511214992 Jul 14, 2022
30997c6
Update README.md
dw511214992 Jul 25, 2022
e03bd40
Update automation_init.sh
dw511214992 Jul 26, 2022
04da330
Update automation_init.sh
dw511214992 Sep 27, 2022
84b5547
Update automation_generate.sh
dw511214992 Oct 18, 2022
d454ffd
Update automation_generate.sh
dw511214992 Oct 20, 2022
0541144
Merge remote-tracking branch 'x/main' into main
Oct 26, 2022
c3bce29
Create typescript-emitter-package.json
dw511214992 Dec 7, 2022
dabc7cd
Update typescript-emitter-package.json
dw511214992 Dec 7, 2022
2fdfd4b
Update typescript-emitter-package.json
dw511214992 Dec 9, 2022
ad96247
Update typescript-emitter-package.json
dw511214992 Dec 9, 2022
730facb
Update typescript-emitter-package.json
dw511214992 Dec 9, 2022
e230cd1
Rename typescript-emitter-package.json to typescript-emitter-package1…
dw511214992 Dec 20, 2022
cc724f5
Rename typescript-emitter-package1.json to typescript-emitter-package…
dw511214992 Dec 20, 2022
b8f4e2f
Update automation_init.sh
dw511214992 Dec 20, 2022
75be1c8
Update typescript-emitter-package.json
dw511214992 Dec 21, 2022
bd8d39c
Update automation_init.sh
dw511214992 Dec 21, 2022
c1ed2c1
Update typescript-emitter-package.json
dw511214992 Dec 21, 2022
df2b629
Merge remote-tracking branch 'origin/main' into merge-main
dw511214992 Jan 5, 2023
61ca0bf
Update typescript-emitter-package.json
dw511214992 Jan 10, 2023
6a8db99
Update typescript-emitter-package.json
dw511214992 Jan 10, 2023
801af50
Update typescript-emitter-package.json
dw511214992 Jan 10, 2023
35892d0
Update automation_init.sh
dw511214992 Jan 10, 2023
ded2031
CodeGen from PR 3630 in openapi-env-test/azure-rest-api-specs
Jan 16, 2023
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
94 changes: 73 additions & 21 deletions common/config/rush/pnpm-lock.yaml

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

9 changes: 9 additions & 0 deletions eng/typescript-emitter-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"dependencies": {
"@azure-tools/cadl-typescript": "1.0.0-beta.8",
"@azure-tools/cadl-autorest": "0.24.0",
"@cadl-lang/eslint-config-cadl": "0.5.0",
"@cadl-lang/eslint-plugin": "0.38.0",
"@cadl-lang/library-linter": "0.38.0"
}
}
9 changes: 7 additions & 2 deletions rush.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This is the main configuration file for Rush.
* For full documentation, please see https://rushjs.io
*/ {
*/{
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush.schema.json",
/**
* (Required) This specifies the version of the Rush engine to be used in this repo.
Expand Down Expand Up @@ -1928,6 +1928,11 @@
"packageName": "@azure/arm-billingbenefits",
"projectFolder": "sdk/billingbenefits/arm-billingbenefits",
"versionPolicyName": "management"
},
{
"packageName": "@azure-rest/contosowidgetmanager-rest",
"projectFolder": "sdk/contosowidgetmanager/contosowidgetmanager-rest",
"versionPolicyName": "client"
}
]
}
}
33 changes: 33 additions & 0 deletions sdk/contosowidgetmanager/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.

trigger:
branches:
include:
- main
- feature/*
- release/*
- hotfix/*
exclude:
- feature/v4
paths:
include:
- sdk/contosowidgetmanager/
pr:
branches:
include:
- main
- feature/*
- release/*
- hotfix/*
exclude:
- feature/v4
paths:
include:
- sdk/contosowidgetmanager/
extends:
template: /eng/pipelines/templates/stages/archetype-sdk-client.yml
parameters:
ServiceDirectory: contosowidgetmanager
Artifacts:
- name: azure-rest-contosowidgetmanager-rest
safeName: azurerestcontosowidgetmanagerrest
11 changes: 11 additions & 0 deletions sdk/contosowidgetmanager/contosowidgetmanager-rest/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"plugins": ["@azure/azure-sdk"],
"extends": ["plugin:@azure/azure-sdk/azure-sdk-base"],
"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",
"tsdoc/syntax": "warn"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 1.0.0-beta.1 (2023-01-16)

- Initial Release
59 changes: 59 additions & 0 deletions sdk/contosowidgetmanager/contosowidgetmanager-rest/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Azure ContosoWidgetManager REST client library for JavaScript

Contoso WidgetManager 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**

Key links:

- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/contosowidgetmanager/contosowidgetmanager-rest)
- [Package (NPM)](https://www.npmjs.com/package/@azure-rest/contosowidgetmanager-rest)
- [API reference documentation](https://docs.microsoft.com/javascript/api/@azure-rest/contosowidgetmanager-rest?view=azure-node-preview)
- [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/contosowidgetmanager/contosowidgetmanager-rest/samples)

## Getting started

### Currently supported environments

- LTS versions of Node.js

### Prerequisites

- You must have an [Azure subscription](https://azure.microsoft.com/free/) to use this package.

### Install the `@azure-rest/contosowidgetmanager-rest` package

Install the Azure ContosoWidgetManager REST client REST client library for JavaScript with `npm`:

```bash
npm install @azure-rest/contosowidgetmanager-rest
```

### Create and authenticate a `ContosoWidgetManagerClient`

To use an [Azure Active Directory (AAD) token credential](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token),
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)

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

## 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`:

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

setLogLevel("info");
```

For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).
Loading