Skip to content

Commit

Permalink
Attempt to fix eventTypes scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
filipnavara committed Oct 18, 2024
1 parent dd1452c commit 876fb14
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion generate-calendar.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
./preprocess-openapi-yaml.sh google-discovery-to-openapi/openapi/googleapis.com/v00.00.00000/services/calendar/calendar.yaml > src/Google.Apis.Kiota.Calendar/calendar.generated.yaml
yq eval --inplace '
# Change any to object
.components.schemas.EventWorkingLocationProperties.properties.homeOffice.type = "object"
.components.schemas.EventWorkingLocationProperties.properties.homeOffice.type = "object" |
# Fix eventTypes to array
(.paths.["/calendars/{calendarId}/events"].get.parameters.[] | select(.name == "eventTypes")) += {"schema":{"type":"array","items":{"type":"string"}},"explode":"true"}
' 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
Expand Down

0 comments on commit 876fb14

Please sign in to comment.