-
Notifications
You must be signed in to change notification settings - Fork 2.1k
dpg, clean up generated marker on handwritten files #46525
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
dpg, clean up generated marker on handwritten files #46525
Conversation
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.
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 |
API Change CheckAPIView identified API level changes in this PR and created the following API reviews com.azure:azure-developer-loadtesting |
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'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)
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 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.
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.
These files are not used, and also not released. Hence I just deleted them.
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.
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
These files should not contain
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 byazure-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:
General Guidelines and Best Practices
Testing Guidelines