Skip to content

Fix deeplink to operation under tag with space #4544

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

Conversation

jeffy-grh
Copy link

Description

When a tag had space(s), the deep link to operations under the tag won't work since the id generated for operation has spaces. This issue is not present in deep link to the tag where the space(s) are replaced by underscores.

Motivation and Context

Our use of Swagger UI had operations under a tag with space(s) in between, which we had to link to from our documentation.
Fixes #4120 .

How Has This Been Tested?

The fix was tested manually.
I haven't run any existing test scripts or added any tests to cover this case. I need help for adding test scripts, if possible.

Checklist

My PR contains...

  • No code changes (src/ is unmodified: changes to documentation, CI, metadata, etc.)
  • Dependency changes (any modification to dependencies in package.json)
  • Bug fixes (non-breaking change which fixes an issue)
  • Improvements (misc. changes to existing features)
  • Features (non-breaking change which adds functionality)

My changes...

  • are breaking changes to a public API (config options, System API, major UI change, etc).
  • are breaking changes to a private API (Redux, component props, utility functions, etc.).
  • are breaking changes to a developer API (npm script behavior changes, new dev system dependencies, etc).
  • are not breaking changes.

Documentation

  • My changes do not require a change to the project documentation.
  • My changes require a change to the project documentation.
  • If yes to above: I have updated the documentation accordingly.

Automated tests

  • My changes can not or do not need to be tested.
  • My changes can and should be tested by unit and/or integration tests.
  • If yes to above: I have added tests to cover my changes.
  • If yes to above: I have taken care to cover edge cases in my tests.
  • All new and existing tests passed.

@jeffy-grh
Copy link
Author

@shockey , Do these changes look good for the issue?

@shockey
Copy link
Contributor

shockey commented May 23, 2018

Hey @jeffy-grh! Using the createDeepLinkPath helper seems good, but I'd prefer the escaping to happen where the id is being set (here for tags and here for operations) rather than changing the layout keys entirely.

Copy link
Contributor

@shockey shockey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer the escaping to happen where the id is being set rather than changing the layout keys entirely.

@shockey
Copy link
Contributor

shockey commented Aug 18, 2018

Closing due to inactivity.

This is simply to keep our issue tracker clean - feel free to comment if there are any further thoughts or concerns, and we'll be happy to reopen this.

@shockey shockey closed this Aug 18, 2018
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.

Deep linking does not work for operations with tags containing spaces
2 participants