-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Description
Todo list:
- investigate
- resolve the regression
Probable cause of failing tests: swagger-api/swagger-js#2324.
Failing dependabot PR for [email protected] update: #7766
Example of failed CI run: https://github.com/swagger-api/swagger-ui/runs/4861003032?check_suite_focus=true
swagger.yaml
file for reproducing this regression is available here: https://github.com/swagger-api/swagger-ui/tree/971c6f75360da8f6e65c94b8fe958081698590a2/test/e2e-cypress/static/documents/bugs/5043
Investigation results
The errors are generated during normalization
which is handled in this swagger-js helper. If we turn the normalization off with skipNormalization=true
option things work without errors. Without the normalization the resolved specs are identical in < 3.18.1 and 3.18.0. This regression to normalization
was introduced by following commit into swagger-js: swagger-api/swagger-js@067229e
Code used for investigation:
const util = require('util');
const { default: SwaggerClient } = require('./lib/index.js');
SwaggerClient.resolve({ url: 'http://0.0.0.0:8080/swagger.yaml', skipNormalization: true })
.then((client) => {
console.log(util.inspect(client.spec, { showHidden: false, compact: false, depth: null }));
})
.catch(console.error);
Regression resolution
[email protected] has been released. This release will replace previous releases and fixes the regression in SwaggerUI.