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

Sample generation issues from refreshing MPG samples #2909

Open
kazrael2119 opened this issue Nov 14, 2024 · 1 comment
Open

Sample generation issues from refreshing MPG samples #2909

kazrael2119 opened this issue Nov 14, 2024 · 1 comment
Assignees
Labels
HRLC MQ This issue is part of a "milestone of quality" initiative. p0 priority 0

Comments

@kazrael2119
Copy link
Contributor

kazrael2119 commented Nov 14, 2024

spec pr: Azure/azure-rest-api-specs#31543

1: can't publish samples as folder is dirty(this should be the publish issue not sample gen)

2: genereate unexpected client level parameter : subsriptionId if the client doesn't need it. https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4332275&view=logs&j=47092895-c7c8-567a-c7a6-8c88f3ec178e&t=d293a8e8-c6af-5091-cdf7-4c66482dd6f2&l=793

3: missing property in operation level: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4332275&view=logs&j=47092895-c7c8-567a-c7a6-8c88f3ec178e&t=d293a8e8-c6af-5091-cdf7-4c66482dd6f2&l=796
sample from automation pr: https://github.com/azure-sdk/azure-sdk-for-js/pull/12847/files#diff-f48a5c560070894caa90594d30e7f69278578d503b21ecd790efdfac65973134L27-R17

4: error message: Type 'string' is not assignable to type 'Uint8Array'
tsp file:
link: https://github.com/kazrael2119/azure-rest-api-specs/blob/support-sample-gen-for-ts/specification/contosowidgetmanager/Contoso.Management/employee.tsp#L25-L28

  /** Profile of employee */
  @encode("base64url")
  profile?: bytes;

generated code:https://github.com/azure-sdk/azure-sdk-for-js/blob/e20dffad1c0889fffda4b9b86c7b7fba78fec584/sdk/contoso/arm-contoso/src/models/models.ts#L45-L46

 /** Profile of employee */
  profile?: Uint8Array;

generated sample:https://github.com/azure-sdk/azure-sdk-for-js/blob/e20dffad1c0889fffda4b9b86c7b7fba78fec584/sdk/contoso/arm-contoso/samples-dev/employeesCreateOrUpdateSample.ts#L24

profile: "ms",

5: missing required property: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4345745&view=logs&j=47092895-c7c8-567a-c7a6-8c88f3ec178e&t=d293a8e8-c6af-5091-cdf7-4c66482dd6f2&l=20682
this property exists in spec example, but does not be generated in sdk sample

@MaryGao MaryGao changed the title Sample gen issues from JS SDK Automation Sample generation issues from refreshing MPG samples Nov 19, 2024
@MaryGao MaryGao self-assigned this Nov 19, 2024
@qiaozha qiaozha added HRLC p0 priority 0 MQ This issue is part of a "milestone of quality" initiative. labels Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HRLC MQ This issue is part of a "milestone of quality" initiative. p0 priority 0
Projects
None yet
Development

No branches or pull requests

3 participants