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

Move error transformer implementation from UI to Editor #1926

Open
shockey opened this issue Jan 7, 2019 · 0 comments · May be fixed by Centaurioun/swagger-editor#3
Open

Move error transformer implementation from UI to Editor #1926

shockey opened this issue Jan 7, 2019 · 0 comments · May be fixed by Centaurioun/swagger-editor#3

Comments

@shockey
Copy link
Contributor

shockey commented Jan 7, 2019

In the process of fixing an issue related to instance being stripped from semantic errors (see swagger-api/swagger-ui#5110 and #1925), I had to trace the source of the problem across repositories, which meant the bug took quite a bit of time to nail down.

Describe the solution you'd like

Swagger UI's error transformer implementation should live alongside Swagger Editor's validation implementation, since there's no reason it has to exist in Swagger UI itself.

Describe alternatives you've considered

Another possibility is to provide a framework for error transformers in Swagger UI, and define the actual transformer implementations at runtime through the plugin system (sort of like we do with plugins themselves, and how we provide validators to Swagger Editor at runtime).

Additional context

The implementation was originally placed in Swagger UI for (a) performance reasons, and (b) to avoid multiple state updates that would result in a flash-of-untransformed-errors. Care should be taken to test any changes against these concerns.

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

Successfully merging a pull request may close this issue.

1 participant