Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OpenAI] Update JS tspconfig #24427

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ options:
partial-update: true
enable-sync-stack: true
generate-tests: false
# "@azure-tools/typespec-ts":
# package-dir: "azure-ai-openai"
# emitter-output-dir: "{project-root}/generated"
# generateMetadata: false
# generateTest: false
# isModularLibrary: true
# packageDetails:
# name: "@azure/openai"
"@azure-tools/typespec-ts":
package-dir: "openai"
generateMetadata: false
generateTest: false
isModularLibrary: true
relative-generated-folder: "sources/generated"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this key only introduced for JS emitter? Can JS emitter leverage package-dir? This is the latest schema we're aligned and is rolling out.
#23866

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is being added in Azure/azure-sdk-for-js#26138.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the comment in the above PR. //CC: @weshaggard

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes lets try to avoid this if possible. I'd prefer we simply append "sources/generated" to the package-dir path we are already computing instead of having folks need this property in their tspconfig file.

Copy link
Member

@MaryGao MaryGao Jun 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@deyaaeldeen Not sure you could try the command link in local to verify if the option works or not. Feel free to raise issue in codegen if not.

./eng/common/scripts/TypeSpec-Project-Process.ps1 /home/rc/repos/tmp/spec-repo/specification/contosowidgetmanager/Contoso.WidgetManager 677e272f33a3eaa724abd769af79383a5ac2bba5 https://github.com/Azure/azure-rest-api-specs

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is being added in Azure/azure-sdk-for-js#26138 and I verified it works.

packageDetails:
name: "@azure/openai"