OpenAPITools / OpenAPITools/openapi-generator
[REQ] Print the YAML / JSON dependencies after the generation
Nobody has claimed this yet.
- 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
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 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