OpenAPITools / OpenAPITools/openapi-generator

[REQ] Print the YAML / JSON dependencies after the generation

Open
#2,698 1 comment 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

Is your feature request related to a problem? Please describe.

When using some heavy openapi files, the main entry point of the openapi file, ie the file the user pass in argument to the openapi-generator, may "include" different others openapi file, and again each of them may also "include" others openapi files, ... etc. The hierarchical openapi files dependencies may be heavy and the user is not aware of this tree of dependencies.

Describe the solution you'd like

As the openapi-generator knows this tree of dependencies, it would be really useful for the user to know it. For example, the 3gpp standard defined this kind of yaml file and the absolute dependency tree is as below

N1N2MessageTransfer.yaml
   +-- TS29502_Nsmf_PDUSession.yaml
      +-- TS29510_Nnrf_NFManagement.yaml
         +-- TS29518_Namf_Communication.yaml
            +-- TS29502_Nsmf_PDUSession.yaml
            +-- TS29518_Namf_EventExposure.yaml
               +-- TS29571_CommonData.yaml
            +-- TS29531_Nnssf_NSSelection.yaml
               +-- TS29510_Nnrf_NFManagement.yaml
               +-- TS29571_CommonData.yaml
            +-- TS29571_CommonData.yaml
            +-- TS29572_Nlmf_Location.yaml
               +-- TS29571_CommonData.yaml
         +-- TS29571_CommonData.yaml
      +-- TS29571_CommonData.yaml
      +-- TS32291_Nchf_ConvergedCharging.yaml
         +-- TS29571_CommonData.yaml
         +-- TS29571_CommonData.yaml
   +-- TS29518_Namf_EventExposure.yaml
      +-- TS29571_CommonData.yaml
   +-- TS29531_Nnssf_NSSelection.yaml
      +-- TS29510_Nnrf_NFManagement.yaml
         +-- TS29518_Namf_Communication.yaml
            +-- TS29502_Nsmf_PDUSession.yaml
               +-- TS29510_Nnrf_NFManagement.yaml
               +-- TS29571_CommonData.yaml
               +-- TS32291_Nchf_ConvergedCharging.yaml
                  +-- TS29571_CommonData.yaml
                  +-- TS29571_CommonData.yaml
            +-- TS29518_Namf_EventExposure.yaml
               +-- TS29571_CommonData.yaml
            +-- TS29531_Nnssf_NSSelection.yaml
            +-- TS29571_CommonData.yaml
            +-- TS29572_Nlmf_Location.yaml
               +-- TS29571_CommonData.yaml
         +-- TS29571_CommonData.yaml
      +-- TS29571_CommonData.yaml
   +-- TS29571_CommonData.yaml
   +-- TS29572_Nlmf_Location.yaml
      +-- TS29571_CommonData.yaml

But this is not the "real" dependencies used. I mean, this tree shows the FULL inter-dependencies of each file but does not represent the used and needed dependencies . The needed files list is a subpart of it.

More over, it may be useful to got this full dependencies representation and also the "uniq" files dependencies list, ie the exact files list without duplication.

Describe alternatives you've considered

N/A

Additional context

N/A

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 the openapi-generator generation entry point that resolves YAML and JSON includes. Define how the full dependency tree and deduplicated needed-file list should be represented and printed, then verify the output with a specification containing nested and repeated dependencies.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.