[SDK Automation] different generateInput.json when both swagger and typespec changed
msyyc opened this issue · comments
In https://github.com/Azure/azure-rest-api-specs/pull/29085/files, Python changes both of swagger and tsp, according to log, pipeline provides generateInput.json
like:
which only contains changes about typespec.
However, in https://github.com/Azure/azure-rest-api-specs/pull/29019/files. Java changes both of swagger and tsp, according to https://dev.azure.com/azure-sdk/590cfd2a-581c-4dcb-a12e-6568ce786175/_apis/build/builds/3782156/logs/480, pipeline is called twice with different generateInput.json
@msyyc , the difference between Python automation run and Java automation run is the configured mode for generation is different. Refer to Python config and Java config.
When using the 'one-for-all-configs' mode in SDK automation, the generation process will prioritize TypeSpec
over Swagger
. This can result in the generation being skipped based on swagger
if TypeSpec
is present. If we want to generate SDK from swagger, the emitter option should be deleted or commented out.
@raych1 I hope pipeline could keep current process for Python that only typespec folder is provided even if both of tyepspec and swagger folder are changed.
Yes, we agree on this strategy currently.