generator for patch v1 (#46)
This commit is contained in:
committed by
Brendan Burns
parent
9d263ec5a7
commit
8b1ebbc7a4
@@ -59,3 +59,4 @@ sed -i '/BaseUri = new System.Uri(\"\");/ d' ${OUTPUT_DIR}/Kubernetes.cs
|
||||
# remove public prop from Quantity, (autorest cannot generate empty class)
|
||||
sed -i '/JsonProperty/ d' ${OUTPUT_DIR}/Models/ResourceQuantity.cs
|
||||
sed -i 's/public string Value/private string Value/' ${OUTPUT_DIR}/Models/ResourceQuantity.cs
|
||||
sed -i 's/; set/; private set/' ${OUTPUT_DIR}/Models/V1Patch.cs
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
<argument>--directive={from: "swagger-document", where: "$..*[?(@.operationId === \"readNamespacedPodLog\")]", transform: "$.responses[\"200\"].schema = { \"type\": \"object\", \"format\": \"file\" }"}</argument>
|
||||
<argument>--directive={from: "swagger-document", where: "$.definitions", transform: "$[\"intstr.IntOrString\"] = {\"properties\": { \"value\": { \"type\": \"string\" }}}"}</argument>
|
||||
<argument>--directive={from: "swagger-document", where: "$.definitions", transform: "$[\"resource.Quantity\"] = {\"properties\": { \"value\": { \"type\": \"string\" }}}"}</argument>
|
||||
<argument>--directive={from: "swagger-document", where: "$.definitions", transform: "$[\"v1.Patch\"] = {\"properties\": { \"content\": { \"type\": \"object\" }}}"}</argument>
|
||||
<argument>--use=@microsoft.azure/autorest.csharp@preview</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
|
||||
@@ -135,7 +135,7 @@ def preserved_primitives_for_language(client_language):
|
||||
if client_language == "java":
|
||||
return ["intstr.IntOrString", "resource.Quantity"]
|
||||
elif client_language == "csharp":
|
||||
return ["intstr.IntOrString", "resource.Quantity"]
|
||||
return ["intstr.IntOrString", "resource.Quantity", "v1.Patch"]
|
||||
else:
|
||||
return []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user