OpenAPITools / OpenAPITools/openapi-generator

[BUG] openapi-generator-maven-plugin in corporate proxy fails on http references

Open
#2,827 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Bug Swagger-Parser
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Description

I've beeing using openapi-generator-maven-plugin for a while on different versions up to 3.3.4. I have my API definition in a YAML file and I tried to use absolute references to make references to common or shared API "components" (or fragments) hosted on a dedicated repository and publicly accessible via http in order to reuse those components in several API definitions.

But it looks that the generator fails to reach these remote API components when I run it in a corporate network (relative references in the filesystem works on the other side). I've tried the same outside the work network and it works fine. So that's why I think the openapi-generator-maven-plugin don't deal properly with proxies. I must point that other maven plugins such as WGET:

<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.4.1</version>

do work with the same network and setup, that's what I think it is not a Maven or network issue.

The result is that openapi-generator can't reach the referenced components via http and generation fails.

I'm using it to generate for Spring (interfaces and models only).

P.S. The maven is run by corporate Jenkins CI (but I insist that maven wget plugin works fine in the same setup)

openapi-generator version

3.3.4

Command line used for generation

mvn clean install

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 with the openapi-generator-maven-plugin entry point and reproduce the reported mvn clean install generation using an HTTP component reference through a corporate proxy. Compare its behavior with the working Maven WGET plugin; done means Spring interfaces and models generate successfully in the proxy-backed environment.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, openapi
Domain
api, build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.