swagger-api / swagger-parser

Swagger Spec to Java POJOs
http://swagger.io
Apache License 2.0
788 stars 531 forks source link

Swagger Parser validation failed when the content contains ./ #1426

Open HiranyaKavishani opened 4 years ago

HiranyaKavishani commented 4 years ago

Description

When [1] is parsing through swagger-parser, it has been failed due to ./ which is in url: ./LICENSE

Eg:

  license:
    name: MIT
    url: ./LICENSE
  title: Brain Web API
  version: v2.17.0

version

swagger-parser-v2.0.20

[1] https://github.com/APIs-guru/openapi-directory/blob/master/APIs/intellifi.nl/v2.17.0/openapi.yaml

r-sreesaran commented 3 years ago

please check the specification. The specification explicitly says the url must be "A URL to the license used for the API. MUST be in the format of a URL." https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#license-object