Skip to content

Commit

Permalink
Update docs for the new added config fixed-array (#1386)
Browse files Browse the repository at this point in the history
  • Loading branch information
dolauli authored Oct 8, 2024
1 parent d9e6747 commit 2f0805c
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions docs/migration-from-v3-to-v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,19 @@ keep-pec-and-plr: true

## None-fixed array

In v3, if a response contained a property with an array type, it was generated as a fixed-size C# array that couldn't support adding new elements through functions like Add. In v4, we generate a list instead of an array to support the Add function in such cases.
In v3, if a response contained a property with an array type, it was generated as a fixed-size C# array that couldn't support adding new elements through functions like Add. In v4, by default, we generate a list instead of an array to support the Add function in such cases. As a result, from users' perspective, the following modifications should be made in scripts that utilize PowerShell modules generated with v4:

- Use Count instead of Length to retrieve the number of elements
- Use the ToArray function if conversion to a fixed-size array is needed

### How to mitigate the breaking changes of non-fixed array

This is a design change and we do not provide a way to generate fixed array anymore. From users' perspective, the following modifications should be made in scripts that utilize PowerShell modules generated with v4:
Configure `fixed-array` as `true` in README.md

```
fixed-array: true
```

- Use Count instead of Length to retrieve the number of elements
- Use the ToArray function if conversion to a fixed-size array is needed

## X-ms-mutability support

Expand Down

0 comments on commit 2f0805c

Please sign in to comment.