[BREAKING] Replace --split with --merge-sources and Move generated extensions into their own source files#95
[BREAKING] Replace --split with --merge-sources and Move generated extensions into their own source files#95liamnichols merged 9 commits intoCreateAPI:mainCreateAPI/CreateAPI:mainfrom LePips:merge-sources-and-split-extensionsLePips/CreateAPI:merge-sources-and-split-extensionsCopy head branch name to clipboard
--split with --merge-sources and Move generated extensions into their own source files#95Conversation
liamnichols
left a comment
There was a problem hiding this comment.
Great work on this, thanks for picking it up @LePips!
What is the notification however for moving the extensions out of Entities.swift and Paths.swift when using --merge-sources? It makes sense when splitting, but this one looks a little odd:
I think I would have expected these to stay inside the merged file?
Secondly, I just want to bring this to your attention: #47
I'm thinking that maybe we can just go all of the way and move --merge-sources into the configuration options instead? WDYT about that approach?
There is also another part of that ticket that is relevant to you, which is about how to go about describing the filename templates in the config too so any feedback is welcomed 👍
I was under the impression that they should be broken out no matter what from #60 and personally think they should be. The only use case I can think of for merging schema-generated objects/paths would be for reference or other developer-meta purposes. While devs might also move files around, they will still have to be responsible for moving these extensions as well (split or merged). Essentially, it splits the concerns of each file: I don't think that this simple change in logic should worry about that until a consensus is reached there. I'll leave my thoughts on the issue. |
Doh, you are right.. I forgot that I even suggested that 😅 #60 (comment)
Sure 👍 Let me just do some final tests of this change 👀 It's hard to review on GitHub as the diff freezes up my browser 😄 |
liamnichols
left a comment
There was a problem hiding this comment.
It looks like the old Tests/CreateAPITests/Expected/petstore-split directory is still here, can we delete it please 🙏
Co-authored-by: Liam Nichols <liam.nichols.ln@gmail.com>
--split with --merge-sources and Move generated extensions into their own source files
|
Its not worth changing it now, but my suggestion if we were to do this again would be to submit a pull request that switches Thanks again though for working on this! Will merge it once the checks finish ✅ |
|
Thanks again @LePips for the great contribution 🚀 |

--splitor--no-splitflag #87--split(-s) the default behaviour #74What
--merge-sourcesflag