-
Notifications
You must be signed in to change notification settings - Fork 16
Description
- CLI version: 0.6.1
- OS: Linux (Ubuntu 20.04)
- Node.js version: 16.x
- SwaggerHub version if On-Premise: 1.29.1-89
Describe the bug you're encountering
When trying to validate an API from a bash task in an Azure DevOps deployment pipeline using the following command:
swaggerhub api:validate {SWAGGERHUB_ORGANIZATION}/{API_NAME}/{API_VERSION}
It fails with this output error:
Error: request to https://{SERVER}/v1/apis/{OWNER}/{API}/{VERSION}/validation failed, reason: Parse Error: Invalid header value char
Note: the above command fails even when a direct call to the validation operation from the same pipeline via curl using the same parameters works correctly.
To reproduce...
Steps to reproduce the behavior:
-
Given
A deployment pipeline in Azure DevOps Services (Microsoft-hosted agent) using an Ubuntu virtual machine image
An on-premise (reachable) instance of SwaggerHub that has API Standardization enabled
An API specification to be validated
A bash script to run the API validation command from the pipeline -
Execute command 'swaggerhub api:validate {SWAGGERHUB_ORGANIZATION}/{API_NAME}/{API_VERSION}'
-
See error
Error: request to https://SERVER/v1/apis/OWNER/API/VERSION/validation failed, reason: Parse Error: Invalid header value char
Expected behavior
The command should validate the API and print the relevant validation messages as output.