Skip to content

Commit 5979db8

Browse files
authored
Add typespec-powershell configuration for dependencymap (#35192)
* Add typespec-powershell configuration for dependencymap * Fix format fo tspconfig.yaml in dependency map * Disable sample generation for dependency map in go to work around an issue in go emitter
1 parent 69eadf9 commit 5979db8

File tree

1 file changed

+50
-1
lines changed
  • specification/azuredependencymap/DependencyMap.Management

1 file changed

+50
-1
lines changed

specification/azuredependencymap/DependencyMap.Management/tspconfig.yaml

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,60 @@ options:
4141
examples-directory: "{project-root}/examples"
4242
fix-const-stuttering: true
4343
flavor: "azure"
44-
generate-samples: true
44+
generate-samples: false
4545
generate-fakes: true
4646
head-as-boolean: true
4747
inject-spans: true
4848
remove-unreferenced-types: true
49+
"@azure-tools/typespec-powershell":
50+
service-dir: "src"
51+
package-dir: "DependencyMap/DependencyMap.Autorest"
52+
clear-output-folder: true
53+
debug: true
54+
azure: true
55+
module-version: 0.1.0
56+
prefix: "Az"
57+
subject-prefix: "DependencyMap"
58+
service-name: DependencyMap
59+
module-name: "{prefix}.{service-name}"
60+
output-folder: "{output-dir}"
61+
exclude-tableview-properties:
62+
- Id
63+
- Type
64+
directive:
65+
- where:
66+
subject: Operation
67+
hide: true
68+
- where:
69+
parameter-name: SubscriptionId
70+
set:
71+
default:
72+
script: "(Get-AzContext).Subscription.Id"
73+
- where:
74+
variant: ^(Create|Update|Export)(?!.*?Expanded|ViaJsonString|ViaJsonFilePath)
75+
remove: true
76+
- where:
77+
subject: MapConnection
78+
variant: ^(Get)(?!.*?Expanded|ViaJsonString|ViaJsonFilePath)
79+
remove: true
80+
- where:
81+
variant: ^CreateViaIdentity$|^CreateViaIdentityExpanded$
82+
remove: true
83+
- where:
84+
verb: Set
85+
remove: true
86+
# Remove four post operations since there are issues in tsp and response schema are not defined.
87+
- where:
88+
subject: MapConnection|MapDependencyView
89+
verb: Get
90+
remove: true
91+
- where:
92+
verb: Export
93+
remove: true
94+
- no-inline:
95+
- DiscoverySourceResourceProperties
96+
- model-cmdlet:
97+
- model-name: OffAzureDiscoverySourceResourceProperties
4998
linter:
5099
extends:
51100
- "@azure-tools/typespec-azure-rulesets/resource-manager"

0 commit comments

Comments
 (0)