-
Notifications
You must be signed in to change notification settings - Fork 46
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
base: main
Are you sure you want to change the base?
Conversation
No changes needing a change description found. |
enableOperationGroup: true | ||
packageDetails: | ||
name: "@azure/{{#normalizePackageName}}{{parameters.ServiceNamespace}}{{/normalizePackageName}}" | ||
"@azure-tools/typespec-go": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tadelesh could you verify?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't know whether normalizePackageName
represent for. this config value is always from arch board review. we could not use some common placeholder for them.
clear-output-folder: true | ||
model-namespace: false | ||
namespace: "{package-dir}" | ||
"@azure-tools/typespec-python": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@msyyc could you verify?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what is the meaning of normalizePackageName
and ServiceNamespace
and you can refer to the template https://github.com/Azure/azure-rest-api-specs/blob/ab67c148ec716a0d0075770742d54468f128c72e/specification/contosowidgetmanager/Contoso.Management/tspconfig.yaml#L18-L23
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied it from the data plane template:
package-dir: "{{#normalizePackageName}}{{parameters.ServiceNamespace}}{{/normalizePackageName}}" |
What do you recommend the generic value for
package-dir
should be?
package-dir: "{{#normalizePackageName}}{{parameters.ServiceNamespace}}{{/normalizePackageName}}" | ||
namespace: com.{{#toLowerCase}}{{parameters.ServiceNamespace}}{{/toLowerCase}} | ||
service-name: "{service-name}" | ||
"@azure-tools/typespec-ts": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wanlwanl could you verify? is modular what we recommend for the template?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can try these changes here
|
service-dir: "{{#normalizePackageName}}{{parameters.ServiceNamespace}}{{/normalizePackageName}}" | ||
package-dir: "{{#normalizePackageName}}{{parameters.ServiceNamespace}}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
service-dir: "{{#normalizePackageName}}{{parameters.ServiceNamespace}}{{/normalizePackageName}}" | |
package-dir: "{{#normalizePackageName}}{{parameters.ServiceNamespace}}" | |
service-dir: "sdk/resourcemanager/{{normalizePackageName}}" | |
package-dir: "arm{{normalizePackageName}}" |
namespace: com.{{#toLowerCase}}{{parameters.ServiceNamespace}}{{/toLowerCase}} | ||
service-name: "{service-name}" | ||
"@azure-tools/typespec-ts": | ||
package-dir: "{{#normalizePackageName}}{{parameters.ServiceNamespace}}{{/normalizePackageName}}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may lack of some contexts, will this tspconfig be handled by some tool to replace these place holder? Could you please describe it? I can't verify it since I don't know what will be generated from {{#normalizePackageName}}
, {{parameters.ServiceNamespace}}
and {{/normalizePackageName}}
.
But I can provide the following ts's emitter options rules based on modular config sample used by js doc.
e.g. add name: contoso
in parameters
package-dir: "arm-{name}"
packageDetails:
name: "@azure/{package-dir}"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@raych1 do you know about these placeholders {{#normalizePackageName}}
, {{parameters.ServiceNamespace}}
and {{/normalizePackageName}}
? When and how to handle the placeholders?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maririos I am also curious about what are the scenarios behind this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the template project which will scaffold a new project based on the selected template when run tsp init
command. The purpose is to ensure the generated tspconfig.yaml
by these templates have the recommended settings.
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