Skip to content
Open
Show file tree
Hide file tree
Changes from 5 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
5 changes: 2 additions & 3 deletions src/DataBox/DataBox.Autorest/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - DataBox")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.3.3")]
[assembly: System.Reflection.AssemblyVersionAttribute("0.3.3")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.5.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("0.5.0")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]

79 changes: 45 additions & 34 deletions src/DataBox/DataBox.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,18 @@ title: DataBox
subject-prefix: $(service-name)
inlining-threshold: 50

# If there are post APIs for some kinds of actions in the RP, you may need to
# uncomment following line to support viaIdentity for these post APIs
# identity-correction-for-post: true

# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
use-extension:
"@autorest/powershell": "3.x"
disable-transform-identity-type-for-operation:
- Jobs_Update

directive:
# Following is two common directive which are normally required in all the RPs
# 1. Remove the unexpanded parameter set
# 2. For New-* cmdlets, ViaIdentity is not required, so CreateViaIdentityExpanded is removed as well
- where:
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$|^UpdateViaIdentityExpanded$|^GetViaIdentity$|^Validate.*$ |^Cancel$|^CancelViaIdentity.*$|^DeleteViaIdentity$
variant: ^(Create)(?!.*?(Expanded|JsonFilePath|JsonString))
remove: true
- where:
variant: ^CreateViaIdentity$|^CreateViaIdentityExpanded$|^GetViaIdentity$|^Validate.*$ |^Cancel$|^CancelViaIdentity.*$|^DeleteViaIdentity$
remove: true
# Remove the set-* cmdlet
- where:
Expand Down Expand Up @@ -99,17 +97,17 @@ directive:
set:
subject: JobCredential

- where:
verb: New
parameter-name: IdentityUserAssignedIdentity
set:
parameter-name: UserAssignedIdentity
# - where:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If these directives are no longer in use, can we remove them instead of commenting them out?

# verb: New
# parameter-name: IdentityUserAssignedIdentity
# set:
# parameter-name: UserAssignedIdentity

- where:
verb: Update
parameter-name: IdentityUserAssignedIdentity
set:
parameter-name: UserAssignedIdentity
# - where:
# verb: Update
# parameter-name: IdentityUserAssignedIdentity
# set:
# parameter-name: UserAssignedIdentity

- where:
parameter-name: PreferenceStorageAccountAccessTierPreference
Expand Down Expand Up @@ -146,27 +144,40 @@ directive:
- DeliveryType
- Detail

- from: source-file-csharp
where: $
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IJobSecrets', 'public Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.Api20250201.IJobSecrets');
# - from: source-file-csharp
# where: $
# transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IJobSecrets', 'public Microsoft.Azure.PowerShell.Cmdlets.DataBox.Models.IJobSecrets');

- model-cmdlet:
- DataBoxDiskJobDetails
- DataBoxHeavyJobDetails
- DataBoxJobDetails
- StorageAccountDetails
- ManagedDiskDetails
- KeyEncryptionKey
- ShippingAddress
- ContactDetails
- TransferConfiguration
```
``` yaml
directive:
no-inline: # the name of the model schema in the swagger file
- model-name: DataBoxDiskJobDetails
cmdlet-name: New-AzDataBoxDiskJobDetailsObject
- model-name: DataBoxHeavyJobDetails
cmdlet-name: New-AzDataBoxHeavyJobDetailsObject
- model-name: DataBoxJobDetails
cmdlet-name: New-AzDataBoxJobDetailsObject
- model-name: StorageAccountDetails
cmdlet-name: New-AzDataBoxStorageAccountDetailsObject
- model-name: ManagedDiskDetails
cmdlet-name: New-AzDataBoxManagedDiskDetailsObject
- model-name: KeyEncryptionKey
cmdlet-name: New-AzDataBoxKeyEncryptionKeyObject
- model-name: ShippingAddress
cmdlet-name: New-AzDataBoxShippingAddressObject
- model-name: ContactDetails
cmdlet-name: New-AzDataBoxContactDetailsObject
- model-name: TransferConfiguration
cmdlet-name: New-AzDataBoxTransferConfigurationObject
- model-name: DataBoxCustomerDiskJobDetails
cmdlet-name: New-AzDataBoxCustomerDiskJobDetailsObject

- no-inline: # the name of the model schema in the swagger file
- KeyEncryptionKey
- JobDetails
- ShippingAddress
- ContactDetails
- TransferConfiguration

- where:
verb: Update
hide: true
```
Loading