Skip to content

Conversation

weidongxu-microsoft
Copy link
Member

@weidongxu-microsoft weidongxu-microsoft commented Aug 28, 2025

These files should not contain

// Code generated by Microsoft (R) ### Code Generator.

Some of them are generated before, but no longer needed.
Some of them are just handwritten, but maybe due to copy-paste the file still contains this marker.

There is still some files in azure-ai-inference, which I will handle in another PR (due to the CI issue caused by azure-ai-projects)

Description

Please add an informative description that covers that changes made by the pull request and link all relevant issues.

If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@weidongxu-microsoft weidongxu-microsoft changed the title eng, clean up generated marker dpg, clean up generated marker Aug 28, 2025
@weidongxu-microsoft weidongxu-microsoft changed the title dpg, clean up generated marker dpg, clean up generated marker on handwritten files Aug 28, 2025
@weidongxu-microsoft weidongxu-microsoft marked this pull request as ready for review August 28, 2025 06:36
@Copilot Copilot AI review requested due to automatic review settings August 28, 2025 06:36
@weidongxu-microsoft weidongxu-microsoft requested a review from a team as a code owner August 28, 2025 06:36
Copy link
Contributor

@Copilot 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.

Pull Request Overview

This PR removes incorrect code generation markers from handwritten sample files across two Azure SDK client libraries. The files were manually authored but incorrectly contained "Code generated by Microsoft (R) AutoRest Code Generator" comments.

Key changes:

  • Removes code generation markers from handwritten sample files
  • Cleans up an extra blank line in one file

Reviewed Changes

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

Show a summary per file
File Description
sdk/devcenter/azure-developer-devcenter/src/samples/java/com/azure/developer/devcenter/EnvironmentSamples.java Removes AutoRest code generation comment
sdk/devcenter/azure-developer-devcenter/src/samples/java/com/azure/developer/devcenter/DevBoxSamples.java Removes AutoRest code generation comment
sdk/devcenter/azure-developer-devcenter/src/samples/java/com/azure/developer/devcenter/CreateClientSamples.java Removes AutoRest code generation comment
sdk/contentsafety/azure-ai-contentsafety/src/samples/java/com/azure/ai/contentsafety/ManageTextBlocklist.java Removes AutoRest code generation comment and extra blank line
sdk/contentsafety/azure-ai-contentsafety/src/samples/java/com/azure/ai/contentsafety/CreateClient.java Removes AutoRest code generation comment
sdk/contentsafety/azure-ai-contentsafety/src/samples/java/com/azure/ai/contentsafety/AnalyzeText.java Removes AutoRest code generation comment
sdk/contentsafety/azure-ai-contentsafety/src/samples/java/com/azure/ai/contentsafety/AnalyzeImage.java Removes AutoRest code generation comment

@weidongxu-microsoft weidongxu-microsoft marked this pull request as draft August 28, 2025 06:37
Copy link
Contributor

github-actions bot commented Aug 28, 2025

API Change Check

APIView identified API level changes in this PR and created the following API reviews

com.azure:azure-developer-loadtesting
com.azure:azure-health-deidentification
com.azure:azure-ai-openai-assistants

Copy link
Member Author

@weidongxu-microsoft weidongxu-microsoft Aug 29, 2025

Choose a reason for hiding this comment

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

I've removed // Code generated by Microsoft (R) TypeSpec Code Generator. comment in all the files within responses package.

AFAIK, they are not generated by the standard procedure (tsp-client update). This package is not in tspconfig.yaml
https://github.com/Azure/azure-rest-api-specs/blob/e25ea3956c8578c2fc2f4ef26d076c7ddd8ddabf/specification/cognitiveservices/OpenAI.Inference/tspconfig.yaml
nor customization
https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/openai/azure-ai-openai/customization/src/main/java/OpenAICustomizations.java

And it does not show up in metadata
https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/openai/azure-ai-openai/src/main/resources/META-INF/azure-ai-openai_apiview_properties.json

Therefore I take them as not generated by emitter, and should not be maintained by codegen.
(there is a pending emitter upgrade, that it would automatically delete files with // Code generated by Microsoft (R) TypeSpec Code Generator. but not actually generated by emitter)

Copy link
Member Author

@weidongxu-microsoft weidongxu-microsoft Aug 29, 2025

Choose a reason for hiding this comment

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

@brandom-msft @jpalvarezl

I didn't find the usage for this 3 files

  • ChatFinishDetails
  • MaxTokensFinishDetails
  • StopFinishDetails

I still keep the files here. But if they are indeed not used, please delete them.

Copy link
Member Author

Choose a reason for hiding this comment

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

These files are not used, and also not released. Hence I just deleted them.

Copy link
Member Author

@weidongxu-microsoft weidongxu-microsoft Aug 29, 2025

Choose a reason for hiding this comment

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

@brandom-msft @jpalvarezl

2 files not used anywhere, and they looks like a generated Java class for multipart/form-data (that get outdated), hence I've deleted them

  • MessageImageFileIdDetails
  • UploadFileRequest

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

Successfully merging this pull request may close these issues.

2 participants