Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To allow shortNames with slashes and avoid swagger ui resolver error
I'd like to update some resource's short names to include a prefix - e.g. component/hero instead of just hero.
It seemed the simplest way I found in previous issues was to change the short name. It works well except in the swagger ui which results in a Resolver error where it cannot resolve the reference if it has another slash in it.
The easiest fix I could think would be to strip the slashes as I've done in this PR.
Alternatively I'd look to tag each resource to group them together is they are an instance on AbstractComponent in my case. But tagging doesn't seem so easy to do dynamically at the moment, even with the DocumentationNormalizer.
Happy for feedback if there's a better solution though. I'd personally quite like a 'route_prefix' option instead but I'm not sure how useful it'd be for others.