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

Allow WithMappings to support scanning SubDirectories when building a WireMockContainer #1139

Closed
Xor-el opened this issue Jul 19, 2024 · 4 comments
Assignees
Labels

Comments

@Xor-el
Copy link

Xor-el commented Jul 19, 2024

First of all, I must thank you for this amazing project.
Now to my question, when using static mappings, is there an overload that allows us indicate that we want to include sub directories in our scan?
please see the code below for an example of what I mean.

   private const string PATH_TO_MAPPINGS = @"my/path/toMappings";

    private readonly WireMockContainer _api = new WireMockContainerBuilder()
        .WithAutoRemove(autoRemove: true)
        .WithMappings(PATH_TO_MAPPINGS, includeSubDirectories: true) // additional flag
        .WithCleanUp(cleanUp: true)
        .Build();
        
    public async Task StartAsync() => await _api.StartAsync();

If such functionality does not exist, I think it would be nice to have.

@StefH StefH self-assigned this Jul 19, 2024
@StefH StefH added feature and removed question labels Jul 19, 2024
@StefH
Copy link
Collaborator

StefH commented Jul 19, 2024

@Xor-el
It's not yet supported I think using this command.
However you maybe can use this for now:

.WithWatchStaticMappings(true)

@Xor-el
Copy link
Author

Xor-el commented Jul 19, 2024

Thanks for the quick response @StefH
Can confirm that your suggested approach works.
will use the workaround for now, very much appreciated.

maybe we can leave this issue open for now as a reminder if you plan to implement this later.

@StefH
Copy link
Collaborator

StefH commented Jul 20, 2024

Will be solved in next release.

#1141

@StefH StefH closed this as completed Jul 20, 2024
@Xor-el
Copy link
Author

Xor-el commented Jul 20, 2024

Thanks for your quick action @StefH

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