Make mapping filenames more user friendly #563

Closed
opened 2025-12-29 15:27:05 +01:00 by adam · 3 comments
Owner

Originally created by @MindaugasLaganeckas on GitHub (Dec 11, 2023).

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

Originally created by @MindaugasLaganeckas on GitHub (Dec 11, 2023). **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
adam added the feature label 2025-12-29 15:27:05 +01:00
adam closed this issue 2025-12-29 15:27:05 +01:00
Author
Owner

@StefH commented on GitHub (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.

@StefH commented on GitHub (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.
Author
Owner

@MindaugasLaganeckas commented on GitHub (Dec 11, 2023):

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 😄

@MindaugasLaganeckas commented on GitHub (Dec 11, 2023): 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 😄
Author
Owner

@StefH commented on GitHub (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.

@StefH commented on GitHub (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 in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net-wiremock#563