swagger-api / swagger-api/swagger-parser

Swagger Parser validation failed when the content contains ./

Open
#1,426 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
867
Forks
560
Avg merge
2d 21h
Merged PRs (30d)
7

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure using the linked openapi.yaml and swagger-parser v2.0.20, focusing on the license.url value of ./LICENSE. Trace the validation path for this relative URL and add a regression test for the example; done means the document parses successfully without validation failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.