Closed haolingdong-msft closed 4 months ago
Also update the tspconfig.yaml in our test module to flavor=azure
.
Personally I'd prefer to put
flavor
to JavaSettings, addgetFlavor
, and keep the convenience APIisBranded
inJavaSettings
.not a strong opinion though, not visible and can be changed later anyway.
I did not add flavor
into it JavaSettings
just to make the change easy, thinking we can add later. But I agree with you adding flavor
to JavaSettings
would be better. If we want to support embed flavor
(brand name) into our generated sdk, we will need this in JavaSettings
. I will update in this pr.
Also make sure you've tested flavor!=azure case locally (that is what needed by Srikanta).
We may need to have a test setup on flavor=generic, but maybe later.
link https://github.com/Azure/autorest.java/issues/2596
Code changes:
branded
related logics in both emitter and codegenflavor
toJavaSettings
TypeSpecPlugin
and emitter. But keep usingJavaSettings.isBranded()
in templates.package-dir
and related logics -> this part is one of Laurent's requirements. Ifpackage-dir
starts withazure
, we will treat as branded. Though we default set to Azure currently, this logic may not take effect, but later we set default to non-azure, this will be effective.