Skip to content

gorillamux.NewRouter fails if any servers url contain variable for port number of the url #367

@karupanerura

Description

@karupanerura

e.g.

openapi: "3.0.0"
servers:
  - url: http://127.0.0.1:{port}/
    variables:
      port:
        default: '8000'

It throws error at https://github.com/getkin/kin-openapi/blob/v0.63.0/routers/gorillamux/router.go#L41

parse "http://127.0.0.1:--------------------------------------------------port__________________________________________________": invalid port ":--------------------------------------------------port__________________________________________________" after host

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions