Closed edonv closed 2 months ago
Hi @edonv,
I recommend using a symlink from Sources/MyTarget/openapi.yaml -> <elsewhere in the repo>
, that allows you to use e.g. an OpenAPI doc from a git submodule.
Thought I saw that as a possibility somewhere but couldn't find it again. Thanks! I'll give that a try.
@edonv That's how I use it in most projects, so if it doesn't work that'd be considered a bug.
Worked great as a symlink locally, haven't tried yet via submodule. But I'd imagine should be fine!
Great, closing then.
Motivation
I’m currently working on a project that requires the spec live in its own repo, as it’s an api spec for a different project. Then, I’d like to be able to generate Swift code for it, looking at that other repo’s spec.
Proposed solution
Not sure the best way to do it. Maybe it’s to just run the CLI plugin and have it generate static code for its own library, or I could add the spec repo as a git submodule use the plugin normally. Either way, I’d like to have it expose code a la the “Curated client library” example.
So I think it could be beneficial to be able to enter the relative path of the spec file, in case the spec needed to be referenced as a submodule in the primary repo.
Alternatives considered
No response
Additional information
No response