Skip to content

Commit

Permalink
Merge branch 'main' into Aman-Jain-14/auto-export-spec-24-07-01
Browse files Browse the repository at this point in the history
  • Loading branch information
Aman-Jain-14 authored Oct 1, 2024
2 parents 7fbf5e8 + ad60d7f commit b8783ed
Show file tree
Hide file tree
Showing 1,755 changed files with 335,627 additions and 2,804 deletions.
15 changes: 8 additions & 7 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,14 @@
###########
# Eng Sys
###########
/.gitattributes @weshaggard @mikeharder
/.gitignore @weshaggard @mikeharder
/.prettierrc.json @weshaggard @mikeharder
/package-lock.json @weshaggard @mikeharder
/package.json @weshaggard @mikeharder
/tsconfig.json @weshaggard @mikeharder
/.gitattributes @weshaggard @mikeharder
/.gitignore @weshaggard @mikeharder
/.prettierrc.json @weshaggard @mikeharder
/package-lock.json @weshaggard @mikeharder
/package.json @weshaggard @mikeharder
/tsconfig.json @weshaggard @mikeharder
/.azure-pipelines/ @weshaggard @mikeharder @benbp
/.github/ @weshaggard @mikeharder @benbp
/eng/ @weshaggard @mikeharder @benbp
/scripts/ @weshaggard @mikeharder
/scripts/ @weshaggard @mikeharder
/.github/CODEOWNERS @Azure/azure-sdk-eng
20 changes: 18 additions & 2 deletions cSpell.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,21 @@
"typescript"
],
"overrides": [
{
"filename": "**/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/**/*.json",
"words": [
"azurearcdata"
]
},
{
"filename": "**/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/**/*.json",
"words": [
"SSRS",
"SSAS",
"SSIS",
"PBIRS"
]
},
{
"filename": "**/specification/batch/**/*.json",
"words": [
Expand Down Expand Up @@ -472,9 +487,10 @@
]
},
{
"filename": "**/specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/WebApps.json",
"filename": "**/specification/web/resource-manager/Microsoft.Web/stable/**/WebApps.json",
"words": [
"sitecontainers"
"sitecontainers",
"updatemachinekey"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion documentation/ci-fix.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ If you have an issue or with any of checks listed in the first column of the tab

| Check name | Owner |
|-----------------------------------|----------------|
| `SDK azure-sdk-for-go` | Ray Chen |
| `SDK azure-sdk-for-go` | Chenjie Shi |
| `SDK azure-sdk-for-java` | Weidong Xu |
| `SDK azure-sdk-for-js` | Qiaoqiao Zhang |
| `SDK azure-sdk-for-net` | Wei Hu |
Expand Down
28 changes: 10 additions & 18 deletions documentation/onboard-dpg-in-sdkautomation/.net/README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
# Add Autorest Configuration of .Net SDK
# Add TypeSpec Configuration of .Net SDK

## Parameter Description
Please copy the following configuration into `tspconfig.yaml` in your spec folder and replace `package-dir` and `namespace` to your own values.

- `<ServiceName>`: The RP name, which is usually same as folder name in swagger.
- `<NameSpace>`: Python package name.
- `<Title>`: SDK Client Name. It's optional if there is a title defined in spec readme.md file.

## Autorest Configuration
Please copy the following configuration into spec PR comment.
~~~
# azure-sdk-for-net-track2
``` yaml
title: <Title>
output-folder: sdk/<ServiceName>/<NameSpace>
require:
- specification/<RPName>/data-plane/readme.md
"@azure-tools/typespec-csharp":
package-dir: "Azure.AI.Vision.Face"
flavor: azure
namespace: "{package-dir}"
```
~~~
- `title`: If it's already defined in spec readme.md, you don't need to define it here again. (By default, there is no `title` defined in spec readme.md in multi client scenario.)
- `output-folder`: The relative path of destination to generate SDK.
- `require`: The item of the value is the relative path of spec readme.md file.
- `package-dir`: Name of your package directory. It should be several parts concatenated with `.` and all the paerts should be pascal case.
- `flavor`: Always `azure` for Azure SDK.
- `namespace`: Should be the same as `package-dir`.
2 changes: 1 addition & 1 deletion eng/pipelines/codeowners-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ stages:
vmImage: ubuntu-22.04

variables:
CodeownersLinterVersion: '1.0.0-dev.20240917.2'
CodeownersLinterVersion: '1.0.0-dev.20240926.2'
DotNetDevOpsFeed: "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json"
RepoLabelUri: "https://azuresdkartifacts.blob.core.windows.net/azure-sdk-write-teams/repository-labels-blob"
TeamUserUri: "https://azuresdkartifacts.blob.core.windows.net/azure-sdk-write-teams/azure-sdk-write-teams-blob"
Expand Down
6 changes: 5 additions & 1 deletion eng/scripts/Get-TypeSpec-Folders.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ Set-StrictMode -Version 3
. $PSScriptRoot/ChangedFiles-Functions.ps1

$repoPath = Resolve-Path "$PSScriptRoot/../.."

$checkAllPath = ((Get-ChildItem "specification" -Directory).Name -replace '^', 'specification/') -replace '$', '/'
$checkedAll = $false

if ($CheckAll) {
$changedFiles = $checkAllPath
$checkedAll = $true
}
else {
$changedFiles = @(Get-ChangedFiles -baseCommitish $BaseCommitish -targetCommitish $TargetCommitish -diffFilter "")
Expand All @@ -21,6 +24,7 @@ else {
if ($coreChangedFiles) {
Write-Verbose "Found changes to core eng or root files so checking all specs."
$changedFiles = $checkAllPath
$checkedAll = $true
}
else {
$changedFiles = Get-ChangedFilesUnderSpecification $changedFiles
Expand Down Expand Up @@ -49,4 +53,4 @@ foreach ($skippedTypespecFolder in $skippedTypespecFolders | Select-Object -Uniq

$typespecFolders = $typespecFolders | ForEach-Object { [IO.Path]::GetRelativePath($repoPath, $_) -replace '\\', '/' } | Sort-Object -Unique

return $typespecFolders
return @($typespecFolders, $checkedAll)
4 changes: 2 additions & 2 deletions eng/scripts/TypeSpec-Validation.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ param (
. $PSScriptRoot/Logging-Functions.ps1
. $PSScriptRoot/Suppressions-Functions.ps1

$typespecFolders = &"$PSScriptRoot/Get-TypeSpec-Folders.ps1" -BaseCommitish:$BaseCommitish -TargetCommitish:$TargetCommitish -CheckAll:$CheckAll
$typespecFolders, $checkedAll = &"$PSScriptRoot/Get-TypeSpec-Folders.ps1" -BaseCommitish:$BaseCommitish -TargetCommitish:$TargetCommitish -CheckAll:$CheckAll

$typespecFoldersWithFailures = @()
if ($typespecFolders) {
$typespecFolders = $typespecFolders.Split('',[System.StringSplitOptions]::RemoveEmptyEntries)
foreach ($typespecFolder in $typespecFolders) {
LogGroupStart "Validating $typespecFolder"

if ($CheckAll) {
if ($checkedAll) {
$suppression = Get-Suppression "TypeSpecValidationAll" $typespecFolder
if ($suppression) {
$reason = $suppression["reason"] ?? "<no reason specified>"
Expand Down
5 changes: 3 additions & 2 deletions eng/tools/tsp-client-tests/test/tsp-client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ const repoRoot = join(__dirname, "..", "..", "..", "..");

async function npmExec(...args: string[]) {
const allArgs = ["exec", "--no", "--"].concat(args);

console.log(`${repoRoot}$ npm ${allArgs.join(" ")}`);

return await execa("npm", allArgs, { all: true, cwd: repoRoot, reject: false });
const result = await execa("npm", allArgs, { all: true, cwd: repoRoot, reject: false });
console.log(result.all);
return result;
}

async function convert(expect: ExpectStatic, readme: string) {
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"@azure-tools/typespec-autorest": "0.46.0",
"@azure-tools/typespec-azure-core": "0.46.0",
"@azure-tools/typespec-azure-portal-core": "0.46.0",
"@azure-tools/typespec-azure-resource-manager": "0.46.0",
"@azure-tools/typespec-azure-resource-manager": "0.46.1",
"@azure-tools/typespec-azure-rulesets": "0.46.0",
"@azure-tools/typespec-client-generator-cli": "0.13.0",
"@azure-tools/typespec-client-generator-core": "0.46.0",
Expand Down
1 change: 0 additions & 1 deletion specification/ai/DocumentIntelligence/tspconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ options:
flavor: azure
generate-test: true
generate-sample: true
examples-dir: "{project-root}/examples"
"@azure-tools/typespec-java":
package-dir: "azure-ai-documentintelligence"
namespace: "com.azure.ai.documentintelligence"
Expand Down
1 change: 0 additions & 1 deletion specification/ai/Face/tspconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ options:
flavor: azure
generate-test: true
generate-sample: true
examples-dir: "{project-root}/examples"
"@azure-tools/typespec-csharp":
package-dir: "Azure.AI.Vision.Face"
namespace: "{package-dir}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ options:
flavor: azure
generate-test: true
generate-sample: true
examples-dir: "{project-root}/examples"
"@azure-tools/typespec-java":
package-dir: "azure-health-insights-radiologyinsights"
namespace: com.azure.health.insights.radiologyinsights
Expand Down
1 change: 0 additions & 1 deletion specification/ai/ImageAnalysis/tspconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ options:
flavor: azure
generate-test: true
generate-sample: true
examples-dir: "{project-root}/examples"
"@azure-tools/typespec-csharp":
package-dir: "Azure.AI.Vision.ImageAnalysis"
namespace: "Azure.AI.Vision.ImageAnalysis"
Expand Down
1 change: 0 additions & 1 deletion specification/apicenter/ApiCenter.DataApi/tspconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ options:
flavor: azure
generate-test: true
generate-sample: true
examples-dir: "{project-root}/examples"
"@azure-tools/typespec-csharp":
package-dir: "azure.ApiCenter"
namespace: "{package-dir}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ options:
flavor: azure
generate-test: true
generate-sample: true
examples-dir: "{project-root}/examples"
"@azure-tools/typespec-csharp":
package-dir: "Azure.Data.AppConfiguration"
namespace: "{package-dir}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ options:
flavor: azure
generate-test: true
generate-sample: true
examples-dir: "{project-root}/examples"
"@azure-tools/typespec-csharp":
package-dir: "LiveMetrics"
namespace: "{package-dir}"
Expand Down
Loading

0 comments on commit b8783ed

Please sign in to comment.