Skip to content
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

[email protected] is failing some E2E tests #7771

Closed
2 tasks done
char0n opened this issue Jan 19, 2022 · 0 comments
Closed
2 tasks done

[email protected] is failing some E2E tests #7771

char0n opened this issue Jan 19, 2022 · 0 comments

Comments

@char0n
Copy link
Member

char0n commented Jan 19, 2022

Todo list:

  • investigate
  • resolve the regression

image

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.

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

No branches or pull requests

1 participant