Skip to content

Relative url for openid does not use server url  #7485

Open
@dkwakkel

Description

@dkwakkel

Q&A (please complete the following information)

  • OS: [windows]
  • Browser: [chrome]
  • Version: 93.0.4577.63 (Official Build) (32-bit)
  • Method of installation: https://editor.swagger.io/#
  • Swagger-Editor version: 3.52.0
  • Swagger/OpenAPI version: [OpenAPI 3.0.3]

Content & configuration

Example Swagger/OpenAPI definition:

openapi: 3.0.3
info:
  title: Test
  version: 1.0.0
servers:
  - url: https://api.example.com/v2
security:
  - openId: []
paths:
  /:
    get:
      tags:
        - Content
      responses:
        '200':
          description: All services of Content Storage Service
components:
  securitySchemes:
    openId:
      type: openIdConnect
      openIdConnectUrl: /.well-known/openid-configuration

Describe the bug you're encountering

Relative url is not resolved as documented in 'Relative Discovery URL' here: https://swagger.io/docs/specification/authentication/openid-connect-discovery/
(above sample is a working one from the documentation of above url)

To reproduce...

Steps to reproduce the behavior:

  1. Load above example in https://editor.swagger.io/#.
  2. Watch request (with fiddler or browser debugger) for well-known
  3. It will go to: https://editor.swagger.io/.well-known/openid-configuration

Expected behavior

Expected: https://api.example.com/.well-known/openid-configuration

Activity

KubaZachacz

KubaZachacz commented on Sep 14, 2021

@KubaZachacz

@dkwakkel
Hey it looks like "servers" are not working but, you can change "host" value to modify call url
Przechwytywanie

KubaZachacz

KubaZachacz commented on Sep 14, 2021

@KubaZachacz

But it also looks like swagger-ui-react totally ignores host and basePath :(

rhertogh

rhertogh commented on Apr 28, 2023

@rhertogh

@ponelat Is there any update on this? I'm running into the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @rhertogh@dkwakkel@ponelat@KubaZachacz

        Issue actions

          Relative url for openid does not use server url · Issue #7485 · swagger-api/swagger-ui