-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Swagger parameters not working with Dredd #866
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I am trying to use a simple GET command with a variable to represent a value on the URI and run this swagger.yml file through Dredd.
` paths: /jobs/{id}: get: tags: - job summary: Finds the status of a job using jobid description: Job id from a previously submitted DA job can be used to find its status parameters: - name: id description: job id type: string in: path required: true responses: '200': description: successful operation schema: type: object properties: jobId: type: string tasks: type: array items: properties: id: type: integer taskType: type: string taskStatus: type: string createdTime: type: string `When I run through Dredd, it complains that parameter id has no example or default value.
error: Compilation error in file 'swagger.yml': Required URI parameter 'id' has no example or default value. (job > /driveprocessing/v1/jobs/{id} > GET)
However, when I try to add a default value, which is contradicting, Dredd complains:
warn: Compilation warning in file 'swagger.yml': Required URI parameter 'id' has a default value.
Default value for a required parameter doesn't make sense from API description perspective. Use example value instead. (job >/driveprocessing/v1/jobs/{id} > GET)
and then it skips running the test case.
skip: GET /driveprocessing/v1/jobs/1ba10167-4560-4973-bd92-db9a747571f5
Question:
How do I specify a value for the id when running the swagger.yml through Dredd?
Thanks,
Chi
The text was updated successfully, but these errors were encountered: