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

Add sdk emitters to arm template #1977

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

maririos
Copy link
Member

Fixes: #1842

We have been working on updating and reviewing the template for SDK emitters on arm. Adding values here so people get the template when they do tsp init

@azure-sdk
Copy link
Collaborator

No changes needing a change description found.

@azure-sdk
Copy link
Collaborator

azure-sdk commented Dec 11, 2024

You can try these changes here

🛝 Playground 🌐 Website 📚 Next docs

maririos and others added 2 commits January 16, 2025 09:32
Co-authored-by: Chenjie Shi <tadelesh.shi@live.cn>
@maririos maririos marked this pull request as ready for review January 16, 2025 17:43
@maririos
Copy link
Member Author

I have updated the file based on feedback. The PR is ready to be reviewed

model-namespace: false
namespace: "{package-dir}"
"@azure-tools/typespec-python":
package-dir: "{package-dir}"
Copy link
Member

Choose a reason for hiding this comment

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

Should we differentiate between the placeholder value and the real value? package-dir in line#15 and line#13 are different cases. The former one is a placeholder, and users need to update it, but the latter one is the actual value, and users don't need to change it.

Copy link
Member Author

Choose a reason for hiding this comment

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

so both properties will have at the end the same value, right? if one is a placeholder value, then why do we expose it to users?

Copy link
Member

Choose a reason for hiding this comment

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

My understanding is that csharp namespace option here simply reuses the value of 'package-dir' option. Generally, exposing it allows user to specify the namespace.
However, for python, as shown on line#15, the 'package-dir' option must be a concrete value and cannot be literally set as "{package-dir}".

Copy link
Member Author

Choose a reason for hiding this comment

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

@msyyc could you help review here and add the values that should be included?

Copy link
Member

Choose a reason for hiding this comment

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

Here is the example template: https://github.com/Azure/azure-rest-api-specs/blob/175d71800b942faaa4113416d5e395b8ba19ce31/specification/contosowidgetmanager/Contoso.Management/tspconfig.yaml#L19-L23.

As Ray said, package-dir shall be set with specific value while package-name can reuse it with {package-dir} so we shall change the format (maybe package-dir: "<Your Package Dir>" to guide users to set the specific value they want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[tsp init] Azure project should be initiated with a tspconfig file with options for client code generation
7 participants