Skip to content

Commit 29c71f2

Browse files
authored
consolidate API View package name and enable API View for swagger review (Azure#18876)
* consolidate API View package name and enable API View for swagger review * fix: wrong sdkType for resourcemanager/internal
1 parent 0cb2b1a commit 29c71f2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

eng/scripts/Language-Settings.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function Get-GoModuleProperties($goModPath)
4343
$modName = $matches["modName"] # We may need to start readong this from the go.mod file if the path and mod config start to differ
4444
$serviceDir = $matches["serviceDir"]
4545
$sdkType = "client"
46-
if ($modName.StartsWith("arm")) { $sdkType = "mgmt" }
46+
if ($modName.StartsWith("arm") -or $modPath.Contains("resourcemanager")) { $sdkType = "mgmt" }
4747

4848
$modVersion, $versionFile = Get-GoModuleVersionInfo $goModPath
4949

eng/tools/generator/cmd/v2/automation/automationCmd.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ func (ctx *automationContext) generate(input *pipeline.GenerateInput) (*pipeline
145145

146146
results = append(results, pipeline.PackageResult{
147147
Version: namespaceResult.Version,
148-
PackageName: namespaceResult.PackageName,
148+
PackageName: fmt.Sprintf("sdk/resourcemanager/%s/%s", namespaceResult.RPName, namespaceResult.PackageName),
149149
Path: []string{fmt.Sprintf("sdk/resourcemanager/%s/%s", namespaceResult.RPName, namespaceResult.PackageName)},
150150
PackageFolder: fmt.Sprintf("sdk/resourcemanager/%s/%s", namespaceResult.RPName, namespaceResult.PackageName),
151151
ReadmeMd: []string{readme},
@@ -154,8 +154,8 @@ func (ctx *automationContext) generate(input *pipeline.GenerateInput) (*pipeline
154154
HasBreakingChange: &breaking,
155155
BreakingChangeItems: &breakingChangeItems,
156156
},
157-
// APIViewArtifact: fmt.Sprintf("sdk/resourcemanager/%s/%s", namespaceResult.RPName, namespaceResult.PackageName+".gosource"),
158-
// Language: "Go",
157+
APIViewArtifact: fmt.Sprintf("sdk/resourcemanager/%s/%s", namespaceResult.RPName, namespaceResult.PackageName+".gosource"),
158+
Language: "Go",
159159
})
160160
}
161161
log.Printf("Finish to process readme file: %s", readme)

0 commit comments

Comments
 (0)