openapi-generator icon indicating copy to clipboard operation
openapi-generator copied to clipboard

[BUG] [C#] [GenericHost] Breaking change in path handling since v7.13

Open marcselman opened this issue 8 months ago • 0 comments

Bug Report Checklist

  • [x] Have you provided a full/minimal spec to reproduce the issue?
  • [x] Have you validated the input using an OpenAPI validator?
  • [x] Have you tested with the latest master to confirm the issue still exists?
  • [x] Have you searched for related issues/PRs?
Description

Our OpenAPI spec contains a servers block at the bottom, similar to this:

  "servers": [
    {
      "url": "/some-path"
    }
  ]

This path would then be used in ClientUtils.CONTEXT_PATH as a path prefix for all endpoints. But because of the changes in this PR #20896 this no longer works ( @devhl-labs ).

Our auto-generated NuGet packages now no longer work because this path is missing.

Is the servers block of the OpenAPI spec no longer supported? Is there a better/new way to set a prefix path for all endpoints? Or is this simply a bug?

marcselman avatar Jun 06 '25 11:06 marcselman