Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

Running dredd on petstore does not produce reports due to API Description processing error when processing OpenAPI specification #1873

Open
stishkin opened this issue Dec 11, 2020 · 1 comment

Comments

@stishkin
Copy link

Describe the bug

Running dredd on petstore does not produce reports due to API Description processing error when processing OpenAPI specification

To Reproduce

node run C:\Users\statis\node_modules\dredd\build\Dredd.js https://petstore.swagger.io/v2/swagger.json https://petstore.swagger.io --reporter html --output report.html --loglevel debug

Expected behavior
Running dredd from command line on endpoints wth OpenAPI should produce reports.

What is in your dredd.yml?
Running from command line with no yml

What's your dredd --version output?

dredd v14.0.0 (Windows_NT 10.0.19042; x64)
dredd v14.0.0 (Linux 4.15.0-1100-azure; x64)

Does dredd --loglevel=debug uncover something?
Nope

Can you send us failing test in a Pull Request?

Commenting out lines 178 to 181 in Dredd.js skips the early exit.
//if (loggerInfos.find((loggerInfo) => loggerInfo.level === 'error')) {
// callback(new Error('API description processing error'), this.stats);
// return;
// }

That way dredd actually runs and produces reports.

@abtris
Copy link
Contributor

abtris commented Feb 3, 2021

$ dredd --version
dredd v14.0.0 (Darwin 19.6.0; x64)
$ dredd https://petstore.swagger.io/v2/swagger.json https://petstore.swagger.io  --no-color --log-level=debug

warn: API description parser warning in https://petstore.swagger.io/v2/swagger.json:0 (from line 0 column 919 to column 945): Only the first scheme will be used to create a hostname
warn: API description parser warning in https://petstore.swagger.io/v2/swagger.json:0 (from line 0 column 8309 to column 8357): Default response is not yet supported
warn: API description parser warning in https://petstore.swagger.io/v2/swagger.json:0 (from line 0 column 8778 to column 8826): Default response is not yet supported
warn: API description parser warning in https://petstore.swagger.io/v2/swagger.json:0 (from line 0 column 11315 to column 11363): Default response is not yet supported
warn: API description parser warning in https://petstore.swagger.io/v2/swagger.json:0 (from line 0 column 11741 to column 11789): Default response is not yet supported
error: API description URI parameters validation error in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > pet > /v2/pet/{petId}/uploadImage > uploads an image > 200 > application/json): Required URI parameter 'petId' has no example or default value.
warn: API description URI template expansion warning in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > pet > /v2/pet/{petId}/uploadImage > uploads an image > 200 > application/json): Ambiguous URI parameter in template: /v2/pet/{petId}/uploadImage
No example value for required parameter in API description document: petId
error: API description URI parameters validation error in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > pet > /v2/pet/{petId} > Find pet by ID > 200 > application/json): Required URI parameter 'petId' has no example or default value.
warn: API description URI template expansion warning in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > pet > /v2/pet/{petId} > Find pet by ID > 200 > application/json): Ambiguous URI parameter in template: /v2/pet/{petId}
No example value for required parameter in API description document: petId
error: API description URI parameters validation error in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > pet > /v2/pet/{petId} > Find pet by ID > 400 > application/json): Required URI parameter 'petId' has no example or default value.
warn: API description URI template expansion warning in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > pet > /v2/pet/{petId} > Find pet by ID > 400 > application/json): Ambiguous URI parameter in template: /v2/pet/{petId}
No example value for required parameter in API description document: petId
error: API description URI parameters validation error in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > pet > /v2/pet/{petId} > Find pet by ID > 404 > application/json): Required URI parameter 'petId' has no example or default value.
warn: API description URI template expansion warning in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > pet > /v2/pet/{petId} > Find pet by ID > 404 > application/json): Ambiguous URI parameter in template: /v2/pet/{petId}
No example value for required parameter in API description document: petId
error: API description URI parameters validation error in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > pet > /v2/pet/{petId} > Updates a pet in the store with form data > 405 > application/json): Required URI parameter 'petId' has no example or default value.
warn: API description URI template expansion warning in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > pet > /v2/pet/{petId} > Updates a pet in the store with form data > 405 > application/json): Ambiguous URI parameter in template: /v2/pet/{petId}
No example value for required parameter in API description document: petId
error: API description URI parameters validation error in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > pet > /v2/pet/{petId} > Deletes a pet > 400 > application/json): Required URI parameter 'petId' has no example or default value.
warn: API description URI template expansion warning in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > pet > /v2/pet/{petId} > Deletes a pet > 400 > application/json): Ambiguous URI parameter in template: /v2/pet/{petId}
No example value for required parameter in API description document: petId
error: API description URI parameters validation error in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > pet > /v2/pet/{petId} > Deletes a pet > 404 > application/json): Required URI parameter 'petId' has no example or default value.
warn: API description URI template expansion warning in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > pet > /v2/pet/{petId} > Deletes a pet > 404 > application/json): Ambiguous URI parameter in template: /v2/pet/{petId}
No example value for required parameter in API description document: petId
error: API description URI parameters validation error in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > store > /v2/store/order/{orderId} > Find purchase order by ID > 200 > application/json): Required URI parameter 'orderId' has no example or default value.
warn: API description URI template expansion warning in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > store > /v2/store/order/{orderId} > Find purchase order by ID > 200 > application/json): Ambiguous URI parameter in template: /v2/store/order/{orderId}
No example value for required parameter in API description document: orderId
error: API description URI parameters validation error in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > store > /v2/store/order/{orderId} > Find purchase order by ID > 400 > application/json): Required URI parameter 'orderId' has no example or default value.
warn: API description URI template expansion warning in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > store > /v2/store/order/{orderId} > Find purchase order by ID > 400 > application/json): Ambiguous URI parameter in template: /v2/store/order/{orderId}
No example value for required parameter in API description document: orderId
error: API description URI parameters validation error in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > store > /v2/store/order/{orderId} > Find purchase order by ID > 404 > application/json): Required URI parameter 'orderId' has no example or default value.
warn: API description URI template expansion warning in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > store > /v2/store/order/{orderId} > Find purchase order by ID > 404 > application/json): Ambiguous URI parameter in template: /v2/store/order/{orderId}
No example value for required parameter in API description document: orderId
error: API description URI parameters validation error in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > store > /v2/store/order/{orderId} > Delete purchase order by ID > 400 > application/json): Required URI parameter 'orderId' has no example or default value.
warn: API description URI template expansion warning in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > store > /v2/store/order/{orderId} > Delete purchase order by ID > 400 > application/json): Ambiguous URI parameter in template: /v2/store/order/{orderId}
No example value for required parameter in API description document: orderId
error: API description URI parameters validation error in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > store > /v2/store/order/{orderId} > Delete purchase order by ID > 404 > application/json): Required URI parameter 'orderId' has no example or default value.
warn: API description URI template expansion warning in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > store > /v2/store/order/{orderId} > Delete purchase order by ID > 404 > application/json): Ambiguous URI parameter in template: /v2/store/order/{orderId}
No example value for required parameter in API description document: orderId
error: API description URI parameters validation error in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > user > /v2/user/{username} > Get user by user name > 200 > application/json): Required URI parameter 'username' has no example or default value.
warn: API description URI template expansion warning in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > user > /v2/user/{username} > Get user by user name > 200 > application/json): Ambiguous URI parameter in template: /v2/user/{username}
No example value for required parameter in API description document: username
error: API description URI parameters validation error in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > user > /v2/user/{username} > Get user by user name > 400 > application/json): Required URI parameter 'username' has no example or default value.
warn: API description URI template expansion warning in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > user > /v2/user/{username} > Get user by user name > 400 > application/json): Ambiguous URI parameter in template: /v2/user/{username}
No example value for required parameter in API description document: username
error: API description URI parameters validation error in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > user > /v2/user/{username} > Get user by user name > 404 > application/json): Required URI parameter 'username' has no example or default value.
warn: API description URI template expansion warning in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > user > /v2/user/{username} > Get user by user name > 404 > application/json): Ambiguous URI parameter in template: /v2/user/{username}
No example value for required parameter in API description document: username
error: API description URI parameters validation error in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > user > /v2/user/{username} > Updated user > 400 > application/json): Required URI parameter 'username' has no example or default value.
warn: API description URI template expansion warning in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > user > /v2/user/{username} > Updated user > 400 > application/json): Ambiguous URI parameter in template: /v2/user/{username}
No example value for required parameter in API description document: username
error: API description URI parameters validation error in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > user > /v2/user/{username} > Updated user > 404 > application/json): Required URI parameter 'username' has no example or default value.
warn: API description URI template expansion warning in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > user > /v2/user/{username} > Updated user > 404 > application/json): Ambiguous URI parameter in template: /v2/user/{username}
No example value for required parameter in API description document: username
error: API description URI parameters validation error in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > user > /v2/user/{username} > Delete user > 400 > application/json): Required URI parameter 'username' has no example or default value.
warn: API description URI template expansion warning in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > user > /v2/user/{username} > Delete user > 400 > application/json): Ambiguous URI parameter in template: /v2/user/{username}
No example value for required parameter in API description document: username
error: API description URI parameters validation error in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > user > /v2/user/{username} > Delete user > 404 > application/json): Required URI parameter 'username' has no example or default value.
warn: API description URI template expansion warning in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > user > /v2/user/{username} > Delete user > 404 > application/json): Ambiguous URI parameter in template: /v2/user/{username}
No example value for required parameter in API description document: username
error: API description URI parameters validation error in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > user > /v2/user/login > Logs user into the system > 200 > application/json): Required URI parameter 'username' has no example or default value.
error: API description URI parameters validation error in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > user > /v2/user/login > Logs user into the system > 200 > application/json): Required URI parameter 'password' has no example or default value.
warn: API description URI template expansion warning in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > user > /v2/user/login > Logs user into the system > 200 > application/json): Ambiguous URI parameter in template: /v2/user/login{?username,password}
No example value for required parameter in API description document: username
warn: API description URI template expansion warning in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > user > /v2/user/login > Logs user into the system > 200 > application/json): Ambiguous URI parameter in template: /v2/user/login{?username,password}
No example value for required parameter in API description document: password
error: API description URI parameters validation error in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > user > /v2/user/login > Logs user into the system > 400 > application/json): Required URI parameter 'username' has no example or default value.
error: API description URI parameters validation error in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > user > /v2/user/login > Logs user into the system > 400 > application/json): Required URI parameter 'password' has no example or default value.
warn: API description URI template expansion warning in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > user > /v2/user/login > Logs user into the system > 400 > application/json): Ambiguous URI parameter in template: /v2/user/login{?username,password}
No example value for required parameter in API description document: username
warn: API description URI template expansion warning in https://petstore.swagger.io/v2/swagger.json (Swagger Petstore > user > /v2/user/login > Logs user into the system > 400 > application/json): Ambiguous URI parameter in template: /v2/user/login{?username,password}
No example value for required parameter in API description document: password
error: API description processing error

Report isn't generated that validation failed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants