SOAR-0015: Add namespace file splitting proposal - #930
Conversation
|
|
||
| - `output.types.fileSplitting.strategy`, currently supporting `namespace`. | ||
|
|
||
| The same model is used by YAML configuration, direct command-line invocation, and programmatic callers that construct `_OpenAPIGeneratorCore.Config` directly. |
There was a problem hiding this comment.
Please remove these implementation details. The design details should be about the conceptual approach and user-visible concepts.
There are many possible implementations, so no need to lock that in the proposal, in fact it can distract from where users should provide feedback - on the API and config file, not on the implementation.
|
|
||
| #### Build-tool plugin boundary | ||
|
|
||
| SwiftPM and Xcode build-tool plugins must declare generated output files before invoking the generator executable. PR #925 therefore rejects build-tool plugin invocations when `output.types.fileSplitting` is configured. |
There was a problem hiding this comment.
Hmm this is unfortunate - we should discuss more what our options are.
There was a problem hiding this comment.
Not being able to support this in the build plugin might actually be an argument for switching this to be the default and making this not even configurable. What do folks think?
|
|
||
| - `Types.swift` for root declarations. | ||
| - `Types+Components.swift` for the generated `Components` namespace. | ||
| - `Types+Operations.swift` for the generated `Operations` namespace. |
There was a problem hiding this comment.
I wonder if we should go one level deeper - one file for #/components/schemas, one file for #/components/parameters, etc.
There was a problem hiding this comment.
This is exactly the follow-up PR I am drafting. It provides a config option to specify if you want the first-level namespaces split or the second-level.
There was a problem hiding this comment.
We should discuss this more - whether and how much can actually be configurable, considering the limitation on build plugins.
Summary
Types.swiftoutput.Notes
The proposal is scoped to the initial namespace split from PR #925:
Types.swift,Types+Components.swift, andTypes+Operations.swift. More advanced sharding remains listed only as future direction.Validation
git diff --check