OpenAPITools / OpenAPITools/openapi-generator
[REQ] [Java] [Maven] InputSpec download from url
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Currently inputSpec must be a file located in the filesystem.
It would be nice to provide an uri like "file:///..." or "http://..." and the maven plugins decides whether it should download the file first or not.
Usually to wanna generate sources for a public service providing a swagger.json file somewhere.
Changes could happen here: https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java#L383
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/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java around the inputSpec handling near line 383. Trace how the Maven plugin currently reads the specification, then determine how local paths and file:// or http:// URIs should be handled. Done means a public remote specification can be used for source generation without breaking filesystem paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100