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

Servers block regression in v0.111.0 #740

Open
iann0036 opened this issue Jan 11, 2023 · 1 comment
Open

Servers block regression in v0.111.0 #740

iann0036 opened this issue Jan 11, 2023 · 1 comment

Comments

@iann0036
Copy link

iann0036 commented Jan 11, 2023

Hi,

For the following schema:

openapi: 3.0.0
info:
  version: 1.0.0
  title: Repro
servers:
  - url: https://something/v1
paths:
  /path1:
    servers:
      - url: https://something/v2
    get:
      summary: some path
      description: ''
      responses:
        '200':
          description: 200 OK
  /mypath2:
    get:
      summary: attempt to find this route
      description: ''
      responses:
        '200':
          description: 200 OK

A gorillamux FindRoute for the /mypath2 fails in v0.111.0. For the same test in v0.110.0, the route is found.

Suspect it relates to the work from #705. Note the exact naming of the paths somehow affects the reproducibility of this bug.

@pbdeuchler
Copy link

^^ as referenced in that issue, I'm also finding regressions here. Additionally, I'm having to add my API versioning prefixes to my servers block in the OpenAPI spec in order to properly pass validation. This means we are not properly matching on hostnames, but also on paths.

I will try to find the time to expand the test suite of the relevant code to hopefully give us more clarity here

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