From 4003602a3ab06649a5cbb23ef0324c9c01ac76cb Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Fri, 31 May 2024 13:34:24 +0200 Subject: [PATCH] More fix ups --- generate-calendar.sh | 2 +- generate-drive.sh | 2 +- generate-gmail.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/generate-calendar.sh b/generate-calendar.sh index 6ca8ec4..b73ba35 100755 --- a/generate-calendar.sh +++ b/generate-calendar.sh @@ -1,4 +1,4 @@ -yq eval '(del(.components.schemas.[].id) | .openapi = "3.0.0" | del(.. | select(has("annotations")).annotations) | .components.schemas.EventWorkingLocationProperties.properties.homeOffice.type = "object") * load("error.yaml") | .paths.[].[]?.["responses"]? += {"4XX":{"description":"Failure response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleApiException"}}}}} | .paths.[].[]?.["responses"]? += {"5XX":{"description":"Failure response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleApiException"}}}}}' google-discovery-to-openapi/openapi/googleapis.com/v00.00.00000/services/calendar/calendar.yaml > src/Google.Apis.Kiota.Calendar/calendar.generated.yaml +yq eval '(del(.components.schemas.[].id) | .openapi = "3.0.0" | del(.. | select(has("annotations")).annotations) | .components.schemas.EventWorkingLocationProperties.properties.homeOffice.type = "object" | with(.. | select(.default? == "false"); .default = false) | with(.. | select(.default? == "true"); .default = true) | with(.. | select(.default? == "0"); .default = 0)) * load("error.yaml") | .paths.[].[]?.["responses"]? += {"4XX":{"description":"Failure response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleApiException"}}}}} | .paths.[].[]?.["responses"]? += {"5XX":{"description":"Failure response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleApiException"}}}}}' google-discovery-to-openapi/openapi/googleapis.com/v00.00.00000/services/calendar/calendar.yaml > src/Google.Apis.Kiota.Calendar/calendar.generated.yaml kiota generate --openapi src/Google.Apis.Kiota.Calendar/calendar.generated.yaml -o src/Google.Apis.Kiota.Calendar/Generated -l CSharp -n Google.Apis.Kiota.Calendar -c CalendarApiClient -s Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory --ds Microsoft.Kiota.Serialization.Json.JsonParseNodeFactory rm src/Google.Apis.Kiota.Calendar/Generated/Models/GoogleApiException.cs rm src/Google.Apis.Kiota.Calendar/Generated/Models/RequestError.cs diff --git a/generate-drive.sh b/generate-drive.sh index 6955ad7..87be3a2 100755 --- a/generate-drive.sh +++ b/generate-drive.sh @@ -1,4 +1,4 @@ -yq eval '(del(.components.schemas.[].id) | .openapi = "3.0.0" | del(.. | select(has("annotations")).annotations)) * load("error.yaml") | .paths.[].[]?.["responses"]? += {"4XX":{"description":"Failure response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleApiException"}}}}} | .paths.[].[]?.["responses"]? += {"5XX":{"description":"Failure response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleApiException"}}}}}' google-discovery-to-openapi/openapi/googleapis.com/v00.00.00000/services/drive/drive.yaml > src/Google.Apis.Kiota.Drive/drive.generated.yaml +yq eval '(del(.components.schemas.[].id) | .openapi = "3.0.0" | del(.. | select(has("annotations")).annotations) | with(.. | select(.format? == "int64"); .type = "integer")) * load("error.yaml") | .paths.[].[]?.["responses"]? += {"4XX":{"description":"Failure response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleApiException"}}}}} | .paths.[].[]?.["responses"]? += {"5XX":{"description":"Failure response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleApiException"}}}}}' google-discovery-to-openapi/openapi/googleapis.com/v00.00.00000/services/drive/drive.yaml > src/Google.Apis.Kiota.Drive/drive.generated.yaml kiota generate --openapi src/Google.Apis.Kiota.Drive/drive.generated.yaml -o src/Google.Apis.Kiota.Drive/Generated -l CSharp -n Google.Apis.Kiota.Drive -c DriveApiClient -s Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory --ds Microsoft.Kiota.Serialization.Json.JsonParseNodeFactory rm src/Google.Apis.Kiota.Drive/Generated/Models/GoogleApiException.cs rm src/Google.Apis.Kiota.Drive/Generated/Models/RequestError.cs diff --git a/generate-gmail.sh b/generate-gmail.sh index dc7a1dc..e68192b 100755 --- a/generate-gmail.sh +++ b/generate-gmail.sh @@ -1,4 +1,4 @@ -yq eval '(del(.components.schemas.[].id) | .openapi = "3.0.0" | del(.. | select(has("annotations")).annotations) | del(.. | select(has("enumDescriptions")).enumDescriptions)) * load("error.yaml") | .paths.[].[]?.["responses"]? += {"4XX":{"description":"Failure response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleApiException"}}}}} | .paths.[].[]?.["responses"]? += {"5XX":{"description":"Failure response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleApiException"}}}}}' google-discovery-to-openapi/openapi/googleapis.com/v00.00.00000/services/gmail/gmail.yaml > src/Google.Apis.Kiota.Gmail/gmail.generated.yaml +yq eval '(del(.components.schemas.[].id) | .openapi = "3.0.0" | del(.. | select(has("annotations")).annotations) | del(.. | select(has("enumDescriptions")).enumDescriptions) | with(.. | select(.format? == "int64"); .type = "integer") | with(.. | select(.format? == "uint64"); .type = "integer")) * load("error.yaml") | .paths.[].[]?.["responses"]? += {"4XX":{"description":"Failure response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleApiException"}}}}} | .paths.[].[]?.["responses"]? += {"5XX":{"description":"Failure response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleApiException"}}}}}' google-discovery-to-openapi/openapi/googleapis.com/v00.00.00000/services/gmail/gmail.yaml > src/Google.Apis.Kiota.Gmail/gmail.generated.yaml kiota generate --openapi src/Google.Apis.Kiota.Gmail/gmail.generated.yaml -o src/Google.Apis.Kiota.Gmail/Generated -l CSharp -n Google.Apis.Kiota.Gmail -c GmailApiClient -s Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory --ds Microsoft.Kiota.Serialization.Json.JsonParseNodeFactory rm src/Google.Apis.Kiota.Gmail/Generated/Models/GoogleApiException.cs rm src/Google.Apis.Kiota.Gmail/Generated/Models/RequestError.cs