OpenAPITools / OpenAPITools/openapi-generator

Running openapi-generator-cli onb a closed corporate network with a maven mirror

Open
#19,359 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Description

I am trying to run the OpenAPI generator CLI using npm but it complains that it cannot reach search.maven.org:

Command I am running in node cmd:

npx @openapitools/openapi-generator-cli generate -i .\fail.oas.yaml -g ruby -o .\temp

Error I am getting:

Unable to query repository, because of: "getaddrinfo ENOTFOUND search.maven.org"

It seems like the tool is trying to access public maven, but I'm on a closed network with no internet. We do have a mirrored of maven which I can access, but how do I tell the tooling to look there instead?

Any help would be massively appreciated!

openapi-generator version
OpenAPI declaration file content or url
Command line used for generation

npx @openapitools/openapi-generator-cli generate -i .\fail.oas.yaml -g ruby -o .\temp

Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement

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 by reproducing the npx @openapitools/openapi-generator-cli generate command in a network without public Maven access, using the fail.oas.yaml input and Ruby generator shown in the issue. Trace how the CLI resolves the generator and queries search.maven.org; done means it can use a configured Maven mirror without contacting the public repository.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, node.js
Domain
build-system, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.