microsoft / typespec

https://typespec.io/
MIT License
4.4k stars 206 forks source link

Only run typespec/eng/emitters/scripts /Generate-APIView-CodeFile.ps for TypeScript/ #4655

Closed jeremymeng closed 2 days ago

jeremymeng commented 3 days ago

https://github.com/microsoft/typespec/blob/010ebded10a3844f8cc4bdbd97072cc75a681065/eng/emitters/scripts/Generate-APIView-CodeFile.ps1

This file is only for TypeScript/JavaScript apiview, it should

https://github.com/search?q=repo%3Amicrosoft%2Ftypespec%20Generate-APIView-CodeFile.ps1&type=code

weidongxu-microsoft commented 3 days ago

@jeremymeng Every language emitter has some typescript code (some may only have typescript code), so it seems valid to do apiview for emitter.

E.g. Java's TypeScript code https://github.com/microsoft/typespec/tree/main/packages/http-client-java/emitter/src

BTW, I tried to add a tsconfig.json under https://github.com/microsoft/typespec/tree/main/packages/http-client-java folder, but that seems not work.

jeremymeng commented 2 days ago

So you need to review the api of emitters? Then that's valid.

jeremymeng commented 2 days ago

BTW, I tried to add a tsconfig.json under https://github.com/microsoft/typespec/tree/main/packages/http-client-java folder, but that seems not work.

For ts-genapi v2, there's no need to build any more. I opened a PR to pin the version to 1.0.7

weidongxu-microsoft commented 2 days ago

Got it. I see. Will find some time to update the script (and what it runs) so that it would work with 2.0.0