OpenAPITools / OpenAPITools/openapi-generator

[Announcement] How I Can Improve the usage of inputSpec for maven plugin

Open
#13,283 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Dear colleagues, first of all, thanks for your nice job and this useful plugin.
I am trying to integrate it with the help of documentation.

Working fine with <inputSpec>${project.basedir}/src/main/resources/api.yaml</inputSpec> the local yml file and the inputSpec is mandatory field.

I need to not keep that file in the repository, so take it for example from my running instance, what I have in the provided configuration below. After annotation scanning processing the yaml on the fly is generated and could be used.

Her is my current configuration, which is not what expecting

            <plugin>
                <groupId>org.openapitools</groupId>
                <artifactId>openapi-generator-maven-plugin</artifactId>
                <version>6.0.1</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <inputSpec>http://localhost:4110/v3/data-ransomware-docs.yaml</inputSpec>
                            <generatorName>html2</generatorName>
                            <configOptions>
                                <sourceFolder>src/gen/java/main</sourceFolder>
                            </configOptions>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

The issue here is that to use properly the plugin I have to have a running instance and only after that can use it from the terminal to run the HTML doc generation.

QUESTION/IMPROVEMENT: Is there any other way how we can have this done?

Thanks in advance

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 configuration and the generate goal, focusing on how inputSpec is required and how the shown HTTP URL is handled. The issue does not identify files, tests, or a decided expected behavior; completion would require agreeing on and validating a supported way to generate HTML documentation from a runtime-produced specification.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.