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

PostConfigure #232

Closed
codehunter13 opened this issue Jun 18, 2022 · 1 comment
Closed

PostConfigure #232

codehunter13 opened this issue Jun 18, 2022 · 1 comment
Assignees

Comments

@codehunter13
Copy link

Hi,

I try to use the standard way to do a postconfigure of the the configuration like this:

services.PostConfigure<SwaggerFileConfiguration>(fileconfiguration =>
{
    foreach (var swaggerEndpoint in fileconfiguration.SwaggerEndPoints)
    {
        ConfigureEndpoint(swaggerEndpoint, configuration);
    }
});

But the foreach is never executed. Any idea why?
For ocelot itself the followiing works:

 services.PostConfigure<FileConfiguration>(fileConfiguration =>
  {
      foreach (var route in fileConfiguration.Routes)
      {
          ConfigureRoute(route, configuration);
      }
  });
@codehunter13
Copy link
Author

Think i found it. The following does what i needs:
services.PostConfigure<List>

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

No branches or pull requests

2 participants