OpenAPITools / OpenAPITools/openapi-generator

Provide support for inputSpec to access Http Url's

Open
#16,731 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

We are storing all our OAS Spec in different repo and duplicating the same file in our repo since gradle openapi generator supports only file input as inputSpec.
Can it be made inputSpec to accept a http url which inturn downloads spec file over http and generate the code.
Ex:
openApiGenerate {
generatorName = 'spring'
inputSpec = "https://github.com/some-repo/openapi-spec.yaml"
configOptions = [
useTags: "true",
reactive: "true",
interfaceOnly: "true",
sourceFolder: "src/main/java",
useSpringBoot3: "true",
generateModelConstructors: "false",
generatedConstructorWithRequiredArgs: "false"
]
}

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 tracing how the Gradle OpenAPI Generator plugin currently reads inputSpec, then identify the existing path used for file-based specifications. Verify how an HTTP URL could be fetched before generation and define the behavior for a reachable remote spec. Done means the shown openApiGenerate configuration accepts the URL and generates code from the downloaded specification.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, openapi
Domain
api, build-system
Issue type
Feature
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.