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

Marker interface for swagger ui index transformer #755

Merged
merged 2 commits into from
Jun 29, 2020

Conversation

natrem
Copy link
Contributor

@natrem natrem commented Jun 29, 2020

close #745

as explained here it eases providing a custom SwaggerIndexTransformer by introducing an intermediary interface.

@bnasslahsen please note the 2nd commit. I factorized some behavior in the abstract class. The rationale is that if you have to duplicate this in mvc and reactive implementations then application creating a new transformation (for instance the linked example) will face the same issue and may have to rewrite same code.
If you're not comfortable with it I don't mind dropping this part; since you have overwriteSwaggerDefaultUrl and addInitOauth I supposed we can add other methods related to the default implementation.

Since you rely on integration tests I did not add specific unit tests on the autoconfiguration but I can if you wish (I've done a few lately so it won't take long)

@bnasslahsen bnasslahsen merged commit 39dd00f into springdoc:master Jun 29, 2020
@bnasslahsen
Copy link
Contributor

Thank you @natrem for your contribution 👍
I couldn't resist to renaming the classes SwaggerIndexPageTransformer and calling the interface SwaggerIndexTransformer. which makes code much cleaner and less impacted files.

It will be available for the next release v1.4.3.

@natrem
Copy link
Contributor Author

natrem commented Jun 30, 2020

I agree the renaming is better but I didn't dare.
thanks again for your job in maintaining these useful libraries

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

Successfully merging this pull request may close these issues.

change SwaggerIndexTransformer and SwaggerConfig design to ease customization
2 participants