Skip to content

Relative URL for openIdConnectUrl has errors #1709

@jblazek

Description

@jblazek
Q A
Bug or feature request? Bug
Which Swagger/OpenAPI version? 3.0.0
Which Swagger-Editor version? 3.4.1
How did you install Swagger-Editor? npm, and hosted swagger.io
Which browser & version? chrome 64.0.3282.186
Which operating system? Windows 10 64-bit

Demonstration API definition

Sample Gist

Using swagger-editor, I'm getting errors when using the example code from openid

servers:
  - url: https://api.example.com/v2

components:
  securitySchemes:
    openId:
      type: openIdConnect
      openIdConnectUrl: /.well-known/openid-configuration

If I change the openIdConnectUrl to be an absolute URL, I don't get issues.

Expected Behavior

I would expect the relative URL to be accepted, since the documentation and example say it's allowed.

Current Behavior

Currently, several errors are displayed

Schema error at components.securitySchemes['openId']
should NOT have additional properties
additionalProperty: openIdConnectUrl
Jump to line 25
Schema error at components.securitySchemes['openId'].type
should be equal to one of the allowed values
allowedValues: apiKey, http, oauth2
Jump to line 26
Schema error at components.securitySchemes['openId'].openIdConnectUrl
should match format "url"
format: url
Jump to line 27

Context

I want to use openid connect, but don't want to specify the full URL, since it depends on the servers I have configured.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions