Swagger doc: array input needed

Swagger doc: array input needed

avatar
(anonymous user)
Product: PowerShell Universal
Version: 4.5.3


I have an API that takes [string [ `] ] $OwnerUPN as input. I defined the docstring above the API to for it to generate a swagger doc. However, on the swaggerUI, this parameter takes a string input instead of an array input.
example: if passed upn1,upn2
via swagger it sends “upn1,upn2” instead of “upn1”,“upn2”
is there any documentation to define the schema of swagger? Thank you

.PARAMETER OwnerUPN
The User Principal Name (UPN) of one or more owners of the app. 
...
param (
    
    [Parameter(Mandatory)]
    [ValidatePattern('^[a-zA-Z0-9._%+-]+@($')]
    [ValidateNotNullorEmpty()]
    [string[]]$OwnerUPN,

)




f66c179886d40f74212ffaf5b74ee66e69c417e5

f66c179886d40f74212ffaf5b74ee66e69c417e5.png

All Comments (0)