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

Make mapping filenames more user friendly #1037

Closed
MindaugasLaganeckas opened this issue Dec 11, 2023 · 3 comments
Closed

Make mapping filenames more user friendly #1037

MindaugasLaganeckas opened this issue Dec 11, 2023 · 3 comments
Labels

Comments

@MindaugasLaganeckas
Copy link
Contributor

Is your feature request related to a problem? Please describe.
If a feature flag AppendGuidToSavedMappingFile is enabled, mapping file names can get very long.
For example, 'Proxy Mapping for POST _ordermanagement_v1_orders_53fd9d98-fd6f-4abf-a393-82b75a5997bc_cancel_ce216a13-e7d6-42d7-91ac-8ae709e2add1.json'. Long names is not an issue in itself. But the spaces (' ') in the name (Proxy' 'Mapping' 'for' 'POST) make navigating files in linux terminal more cumbersome.

Describe the solution you'd like
We suggest to remove the static never changing part of the filename "Proxy Mapping for " from the filename and remove a space between POST and the request url. So the filename in the example would turn into
'POST_ordermanagement_v1_orders_53fd9d98-fd6f-4abf-a393-82b75a5997bc_cancel_ce216a13-e7d6-42d7-91ac-8ae709e2add1.json'

Describe alternatives you've considered
I have considered keeping the name as it is.

Additional context
I can implement the update if we can agree on the solution 😄 I suggest to either always make names shorter in combination with AppendGuidToSavedMappingFile or create an extra flag for it, e.g. MakeMappingFilenamesMoreConcise

@StefH
Copy link
Collaborator

StefH commented Dec 11, 2023

Sounds like a good feature.

I suggest some fine-tuning:

  1. Add a new nullable config setting PrefixForSavedMappingFile. Which has the default value null and can be set by the user to a string value.

  2. Replacing spaces to underscores is good idea.

You can start a PR for this if you like.

@MindaugasLaganeckas
Copy link
Contributor Author

Deal! Thank you! One clarification: should the default value not be "Proxy_Mapping_for_" or even "Proxy Mapping for " to keep the current behavior intact?
I will work on a PR later today/this week 😄

@StefH
Copy link
Collaborator

StefH commented Dec 11, 2023

One clarification: should the default value not be "Proxy_Mapping_for_" or even "Proxy Mapping for " to keep the current behavior intact?

I did think on that, normally I try to keep logic backwards compatible, however I do not think this will be a big impact.

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

No branches or pull requests

2 participants