swagger-api / swagger-api/swagger-parser
Invalid URLs are printed
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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