Skip to content

Commit d10e61c

Browse files
authored
Add a note about an open issue with code generation and SourceKit-LSP
Following the discussion on Slack, this adds a note for users of SourceKit-LSP that the default code generation might not work as expected. https://swift-open-source.slack.com/archives/C02PV8T5HQD/p1726815970093299
1 parent 89d49d2 commit d10e61c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ Swift OpenAPI Generator and integrate with other packages in the ecosystem.
120120
Or if you prefer to watch a video, check out [Meet Swift OpenAPI
121121
Generator](https://developer.apple.com/wwdc23/10171) from WWDC23.
122122

123+
> [!NOTE]
124+
> When using Visual Studio Code or other editors that rely on [SourceKit-LSP](https://github.com/swiftlang/sourcekit-lsp), the editor may not correctly recognize generated code within same module. As a workaround, consider creating a separate target for code generation and importing this module into your application code. For more details, see the discussion in [swiftlang/sourcekit-lsp#665](https://github.com/swiftlang/sourcekit-lsp/issues/665#issuecomment-2093169169).
125+
126+
123127
[openapi]: https://openapis.org
124128
[repo-generator]: https://github.com/apple/swift-openapi-generator
125129
[docs-generator]: https://swiftpackageindex.com/apple/swift-openapi-generator/documentation

0 commit comments

Comments
 (0)