stephaneey / azure-apim-extension

Full Azure API Management suite and more VSTS extension
MIT License
66 stars 48 forks source link

uniqueItems is not a valid property (error returned by Api Azure Management) #47

Closed JuanJose-Herrera closed 5 years ago

JuanJose-Herrera commented 5 years ago

HI @stephaneey,

Firs I want to thank you with the grate job for this pipeline for Azure Api Management.

I don't think this is an issue from you code, but I am requesting your help about if you understand why microsoft return me an error updating the Api from the azure pipe line using powershell and not from the UI.

The error showed by the pipeline is: 2019-04-27T17:59:17.4449422Z Creating or updating API https://management.azure.com/subscriptions/################/resourceGroups/dev-resourcegroup/providers/Microsoft.ApiManagement/service/dev-ocufile-api/apis/user-profile-rest-api?api-version=2018-01-01 2019-04-27T17:59:18.5303686Z @{code=ValidationError; target=representation; message=Parsing error(s): uniqueItems is not a valid property at #/paths//doctor/me/specialties/get/parameters []} 2019-04-27T17:59:18.8508790Z ##[error]The remote server returned an error: (400) Bad Request. 2019-04-27T17:59:18.9137634Z ##[section]Finishing: API Management - Create/Update API

image

If you see the image my definition of the api contains an array of string with the unique keyword equals false, and that is that microsoft send me as not valid, I dont know why, beacuas actualy that is a valid value in the OpenAPI documentation.

The documentation that I review is: https://swagger.io/docs/specification/data-models/data-types/#array Note: I try to update the api with openAPI v2 and V3

stephaneey commented 5 years ago

Hi @JuanJose-Herrera ,

The doc you mentioned is indeed applicable to OpenAPI v3. Please use the task with v3.

Thanks