Skip to content

Support snippets for Modular/RLC/HLC#3052

Merged
MaryGao merged 25 commits intoAzure:mainfrom
kazrael2119:support-snippets-for-modular
Feb 19, 2025
Merged

Support snippets for Modular/RLC/HLC#3052
MaryGao merged 25 commits intoAzure:mainfrom
kazrael2119:support-snippets-for-modular

Conversation

@kazrael2119
Copy link
Copy Markdown
Member

@kazrael2119 kazrael2119 commented Feb 10, 2025

fixes #3024
fixes #3051
fixes #3025

@MaryGao MaryGao changed the title Support snippets for modular Support snippets for Modular/RLC/HLC Feb 13, 2025
@MaryGao MaryGao marked this pull request as ready for review February 13, 2025 06:24
Comment thread packages/autorest.typescript/src/generators/test/snippetsGenerator.ts Outdated
Comment thread packages/rlc-common/src/metadata/buildReadmeFile.ts Outdated
Comment thread packages/typespec-ts/src/index.ts
@qiaozha qiaozha requested a review from Copilot February 19, 2025 07:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 244 out of 255 changed files in this pull request and generated 1 comment.

Files not reviewed (11)
  • packages/autorest.typescript/src/generators/static/hlcREADME.md.hbs: Language not supported
  • packages/autorest.typescript/src/generators/test/snippets.ts.hbs: Language not supported
  • packages/autorest.typescript/src/restLevelClient/generateRestLevel.ts: Evaluated as low risk
  • packages/rlc-common/src/index.ts: Evaluated as low risk
  • packages/autorest.typescript/src/typescriptGenerator.ts: Evaluated as low risk
  • packages/autorest.typescript/test/unit/restLevelClient/files/case-rlcReadme.md: Evaluated as low risk
  • packages/autorest.typescript/src/generators/static/readmeFileGenerator.ts: Evaluated as low risk
  • packages/autorest.typescript/src/generators/static/packageFileGenerator.ts: Evaluated as low risk
  • packages/typespec-ts/src/index.ts: Evaluated as low risk
  • packages/rlc-common/src/metadata/packageJson/buildAzureMonorepoPackage.ts: Evaluated as low risk
  • packages/autorest.typescript/test/unit/generators/static/files/case-hlcReadme.md: Evaluated as low risk
Comments suppressed due to low confidence (2)

packages/autorest.typescript/src/generators/test/snippetsGenerator.ts:26

  • The function hasClientSubscriptionId uses toLocaleLowerCase() which should be toLowerCase().
hasClientSubscriptionId: hasClientSubscriptionId(clientDetails?.samples)

packages/autorest.typescript/test/unit/generators/static/files/case-hlcReadme-without-subid.md:50

  • [nitpick] The use of ts instead of typescript in the code block language identifier might be inconsistent with the rest of the documentation. Consider using typescript for consistency.
Using Node.js and Node-like environments, you can use the `DefaultAzureCredential` class to authenticate the client.

Comment thread packages/rlc-common/src/metadata/buildReadmeFile.ts Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@MaryGao MaryGao requested a review from Copilot February 19, 2025 08:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 244 out of 255 changed files in this pull request and generated no comments.

Files not reviewed (11)
  • packages/autorest.typescript/src/generators/static/hlcREADME.md.hbs: Language not supported
  • packages/autorest.typescript/src/generators/test/snippets.ts.hbs: Language not supported
  • packages/autorest.typescript/src/restLevelClient/generateRestLevel.ts: Evaluated as low risk
  • packages/rlc-common/src/index.ts: Evaluated as low risk
  • packages/autorest.typescript/test/unit/restLevelClient/files/case-rlcReadme.md: Evaluated as low risk
  • packages/autorest.typescript/src/typescriptGenerator.ts: Evaluated as low risk
  • packages/autorest.typescript/src/generators/static/packageFileGenerator.ts: Evaluated as low risk
  • packages/autorest.typescript/src/generators/static/readmeFileGenerator.ts: Evaluated as low risk
  • packages/typespec-ts/src/index.ts: Evaluated as low risk
  • packages/rlc-common/src/metadata/packageJson/buildAzureMonorepoPackage.ts: Evaluated as low risk
  • packages/autorest.typescript/test/unit/generators/static/files/case-hlcReadme.md: Evaluated as low risk
Comments suppressed due to low confidence (2)

packages/rlc-common/src/test/buildSnippets.ts:13

  • [nitpick] The variable name azureSdkForJsInfo is ambiguous. It should be renamed to isAzureSdkForJs.
const azureSdkForJsInfo = azureSdkForJs ? azureSdkForJs : model.options?.azureSdkForJs;

packages/rlc-common/src/test/buildSnippets.ts:8

  • The new behavior introduced in the buildSnippets function is not covered by tests. Ensure that there are tests to cover this new functionality.
export function buildSnippets(

@MaryGao MaryGao enabled auto-merge (squash) February 19, 2025 09:18
@MaryGao MaryGao merged commit 39b8216 into Azure:main Feb 19, 2025
@kazrael2119 kazrael2119 deleted the support-snippets-for-modular branch February 20, 2025 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants