swagger-api / swagger-api/swagger-parser

Invalid URLs are printed

Open
#1,043 0 comments 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

An invalidUrl for the Server will be printed to stack trace. It's annoying
E.g.
https://github.com/swagger-api/swagger-parser/blob/5c480c5cc0d4c25adebc2191e2eb5fda53f3d203/modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/util/OpenAPIDeserializer.java#L396

the e.printStackTrace happens when the server url is
https://some-{placeholder}.example.com

The Place holder value seems to be valid according to the spec. But, it's printed to the stack trace

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

Start in modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/util/OpenAPIDeserializer.java around line 396, where e.printStackTrace is reported for a server URL containing a placeholder. Trace how that URL is validated and handled; done means the valid placeholder URL no longer prints an exception stack trace.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.