Closed Nibell closed 3 years ago
Hi,
Get error on azure pipeline using yml when creating api with artifact. Error is ##[error]Invalid file location D:\a\1\s/OpenApi/swagger.json
I know that swagger.json exist. Get the following from cmd test task. D:\a\1\s\OpenApi\swagger.json
- task: CmdLine@2 inputs: script: | cd $(System.DefaultWorkingDirectory)/OpenApi dir /s /b /o:gn
Pipeline
pool: vmImage: 'windows-latest' - task: apim@5 displayName: Create Api inputs: ConnectedServiceNameARM: '$(AzureResourceManagerConnectionName)' ResourceGroupName: '$(AzureCentralResourceGroupName)' ApiPortalName: '$(AzureCentralApiPortalName)' UseProductCreatedByPreviousTask: true OpenAPISpec: 'v2' Authorization: 'None' SwaggerPicker: 'Artifact' swaggerartifact: '$(System.DefaultWorkingDirectory)/OpenApi/swagger.json' targetapi: '${{ parameters.apimApiCode }}' DisplayName: '${{ parameters.apimApiName }}' pathapi: '${{ parameters.apimUrlSuffix }}' MicrosoftApiManagementAPIVersion: '2018-01-01'
I'm missing something?
Best Regards Nibell
I solved it
Hi,
Get error on azure pipeline using yml when creating api with artifact. Error is ##[error]Invalid file location D:\a\1\s/OpenApi/swagger.json
I know that swagger.json exist. Get the following from cmd test task. D:\a\1\s\OpenApi\swagger.json
Pipeline
I'm missing something?
Best Regards Nibell