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

oas3-server-variables detects ipv6 as invalid url #2554

Open
mapero opened this issue Nov 24, 2023 · 0 comments
Open

oas3-server-variables detects ipv6 as invalid url #2554

mapero opened this issue Nov 24, 2023 · 0 comments
Labels
OpenAPI Issues related to the OpenAPI ruleset t/bug Something isn't working

Comments

@mapero
Copy link

mapero commented Nov 24, 2023

Describe the bug
When using ipv6 as default value of a server variable. spectral issues an error:
error oas3-server-variables A few substitutions of server variables resulted in invalid URLs: https://%5Bfe80::dcad:beff:fe00:0001%5D/api/v1 servers[1].variables

To Reproduce

  1. Given this OpenAPI/AsyncAPI document '...'
servers:
  - url: '/api/v1'
  - url: 'https://{host}/api/v1'
    variables:
      host:
        default: '[fe80::dcad:beff:fe00:0001]'
        description: Hostname or ip address
  1. Run this CLI command '....'
    spectral lint api.yaml
  2. See error
    error oas3-server-variables A few substitutions of server variables resulted in invalid URLs: https://%5Bfe80::dcad:beff:fe00:0001%5D/api/v1 servers[1].variables

Expected behavior
Accept the ip v6 address as valid variable

Screenshots

Environment (remove any that are not applicable):

  • Library version: 6.11.0
  • OS: Ubuntu
@mnaumanali94 mnaumanali94 added t/bug Something isn't working OpenAPI Issues related to the OpenAPI ruleset labels Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OpenAPI Issues related to the OpenAPI ruleset t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants