Skip to content

Commit

Permalink
fix: ignore unknown fields in response (#25)
Browse files Browse the repository at this point in the history
* chore: upgrade to gapic-generator-python 0.40.10

fix: ignore unknown fields returned from server for REST

Source-Author: Bu Sun Kim <[email protected]>
Source-Date: Thu Feb 25 21:29:43 2021 -0700
Source-Repo: googleapis/googleapis-discovery
Source-Sha: 3a6a0438c9143dcb7ecd26f90cc1688d6364d068
Source-Link: googleapis/googleapis-discovery@3a6a043

* chore: Add renovate.json

Source-Author: WhiteSource Renovate <[email protected]>
Source-Date: Fri Feb 26 05:48:14 2021 +0100
Source-Repo: googleapis/googleapis-discovery
Source-Sha: 806768fb4ee175390ce625331cdcb05293786c8f
Source-Link: googleapis/googleapis-discovery@806768f
  • Loading branch information
yoshi-automation authored Feb 26, 2021
1 parent 0e8a28c commit 3f9fc28
Show file tree
Hide file tree
Showing 150 changed files with 1,371 additions and 707 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1495,7 +1495,6 @@
"GetZoneOperationRequest",
"GetZoneRequest",
"GlobalAddressesClient",
"GlobalForwardingRulesClient",
"GlobalNetworkEndpointGroupsAttachEndpointsRequest",
"GlobalNetworkEndpointGroupsClient",
"GlobalNetworkEndpointGroupsDetachEndpointsRequest",
Expand Down Expand Up @@ -2226,6 +2225,7 @@
"UrlMapTest",
"UrlMapValidationResult",
"UrlMapsAggregatedList",
"UrlMapsClient",
"UrlMapsScopedList",
"UrlMapsValidateRequest",
"UrlMapsValidateResponse",
Expand Down Expand Up @@ -2271,5 +2271,5 @@
"ZoneSetLabelsRequest",
"ZoneSetPolicyRequest",
"ZonesClient",
"UrlMapsClient",
"GlobalForwardingRulesClient",
)
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ def aggregated_list(
response.raise_for_status()

# Return the response
return compute.AcceleratorTypeAggregatedList.from_json(response.content)
return compute.AcceleratorTypeAggregatedList.from_json(
response.content, ignore_unknown_fields=True
)

def get(
self,
Expand Down Expand Up @@ -208,7 +210,9 @@ def get(
response.raise_for_status()

# Return the response
return compute.AcceleratorType.from_json(response.content)
return compute.AcceleratorType.from_json(
response.content, ignore_unknown_fields=True
)

def list(
self,
Expand Down Expand Up @@ -263,7 +267,9 @@ def list(
response.raise_for_status()

# Return the response
return compute.AcceleratorTypeList.from_json(response.content)
return compute.AcceleratorTypeList.from_json(
response.content, ignore_unknown_fields=True
)


__all__ = ("AcceleratorTypesRestTransport",)
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ def aggregated_list(
response.raise_for_status()

# Return the response
return compute.AddressAggregatedList.from_json(response.content)
return compute.AddressAggregatedList.from_json(
response.content, ignore_unknown_fields=True
)

def delete(
self,
Expand Down Expand Up @@ -229,7 +231,7 @@ def delete(
response.raise_for_status()

# Return the response
return compute.Operation.from_json(response.content)
return compute.Operation.from_json(response.content, ignore_unknown_fields=True)

def get(
self,
Expand Down Expand Up @@ -308,7 +310,7 @@ def get(
response.raise_for_status()

# Return the response
return compute.Address.from_json(response.content)
return compute.Address.from_json(response.content, ignore_unknown_fields=True)

def insert(
self,
Expand Down Expand Up @@ -394,7 +396,7 @@ def insert(
response.raise_for_status()

# Return the response
return compute.Operation.from_json(response.content)
return compute.Operation.from_json(response.content, ignore_unknown_fields=True)

def list(
self,
Expand Down Expand Up @@ -448,7 +450,9 @@ def list(
response.raise_for_status()

# Return the response
return compute.AddressList.from_json(response.content)
return compute.AddressList.from_json(
response.content, ignore_unknown_fields=True
)


__all__ = ("AddressesRestTransport",)
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ def aggregated_list(
response.raise_for_status()

# Return the response
return compute.AutoscalerAggregatedList.from_json(response.content)
return compute.AutoscalerAggregatedList.from_json(
response.content, ignore_unknown_fields=True
)

def delete(
self,
Expand Down Expand Up @@ -229,7 +231,7 @@ def delete(
response.raise_for_status()

# Return the response
return compute.Operation.from_json(response.content)
return compute.Operation.from_json(response.content, ignore_unknown_fields=True)

def get(
self,
Expand Down Expand Up @@ -301,7 +303,9 @@ def get(
response.raise_for_status()

# Return the response
return compute.Autoscaler.from_json(response.content)
return compute.Autoscaler.from_json(
response.content, ignore_unknown_fields=True
)

def insert(
self,
Expand Down Expand Up @@ -387,7 +391,7 @@ def insert(
response.raise_for_status()

# Return the response
return compute.Operation.from_json(response.content)
return compute.Operation.from_json(response.content, ignore_unknown_fields=True)

def list(
self,
Expand Down Expand Up @@ -444,7 +448,9 @@ def list(
response.raise_for_status()

# Return the response
return compute.AutoscalerList.from_json(response.content)
return compute.AutoscalerList.from_json(
response.content, ignore_unknown_fields=True
)

def patch(
self,
Expand Down Expand Up @@ -531,7 +537,7 @@ def patch(
response.raise_for_status()

# Return the response
return compute.Operation.from_json(response.content)
return compute.Operation.from_json(response.content, ignore_unknown_fields=True)

def update(
self,
Expand Down Expand Up @@ -618,7 +624,7 @@ def update(
response.raise_for_status()

# Return the response
return compute.Operation.from_json(response.content)
return compute.Operation.from_json(response.content, ignore_unknown_fields=True)


__all__ = ("AutoscalersRestTransport",)
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def add_signed_url_key(
response.raise_for_status()

# Return the response
return compute.Operation.from_json(response.content)
return compute.Operation.from_json(response.content, ignore_unknown_fields=True)

def delete(
self,
Expand Down Expand Up @@ -260,7 +260,7 @@ def delete(
response.raise_for_status()

# Return the response
return compute.Operation.from_json(response.content)
return compute.Operation.from_json(response.content, ignore_unknown_fields=True)

def delete_signed_url_key(
self,
Expand Down Expand Up @@ -342,7 +342,7 @@ def delete_signed_url_key(
response.raise_for_status()

# Return the response
return compute.Operation.from_json(response.content)
return compute.Operation.from_json(response.content, ignore_unknown_fields=True)

def get(
self,
Expand Down Expand Up @@ -399,7 +399,9 @@ def get(
response.raise_for_status()

# Return the response
return compute.BackendBucket.from_json(response.content)
return compute.BackendBucket.from_json(
response.content, ignore_unknown_fields=True
)

def insert(
self,
Expand Down Expand Up @@ -485,7 +487,7 @@ def insert(
response.raise_for_status()

# Return the response
return compute.Operation.from_json(response.content)
return compute.Operation.from_json(response.content, ignore_unknown_fields=True)

def list(
self,
Expand Down Expand Up @@ -542,7 +544,9 @@ def list(
response.raise_for_status()

# Return the response
return compute.BackendBucketList.from_json(response.content)
return compute.BackendBucketList.from_json(
response.content, ignore_unknown_fields=True
)

def patch(
self,
Expand Down Expand Up @@ -630,7 +634,7 @@ def patch(
response.raise_for_status()

# Return the response
return compute.Operation.from_json(response.content)
return compute.Operation.from_json(response.content, ignore_unknown_fields=True)

def update(
self,
Expand Down Expand Up @@ -718,7 +722,7 @@ def update(
response.raise_for_status()

# Return the response
return compute.Operation.from_json(response.content)
return compute.Operation.from_json(response.content, ignore_unknown_fields=True)


__all__ = ("BackendBucketsRestTransport",)
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def add_signed_url_key(
response.raise_for_status()

# Return the response
return compute.Operation.from_json(response.content)
return compute.Operation.from_json(response.content, ignore_unknown_fields=True)

def aggregated_list(
self,
Expand Down Expand Up @@ -237,7 +237,9 @@ def aggregated_list(
response.raise_for_status()

# Return the response
return compute.BackendServiceAggregatedList.from_json(response.content)
return compute.BackendServiceAggregatedList.from_json(
response.content, ignore_unknown_fields=True
)

def delete(
self,
Expand Down Expand Up @@ -318,7 +320,7 @@ def delete(
response.raise_for_status()

# Return the response
return compute.Operation.from_json(response.content)
return compute.Operation.from_json(response.content, ignore_unknown_fields=True)

def delete_signed_url_key(
self,
Expand Down Expand Up @@ -400,7 +402,7 @@ def delete_signed_url_key(
response.raise_for_status()

# Return the response
return compute.Operation.from_json(response.content)
return compute.Operation.from_json(response.content, ignore_unknown_fields=True)

def get(
self,
Expand Down Expand Up @@ -473,7 +475,9 @@ def get(
response.raise_for_status()

# Return the response
return compute.BackendService.from_json(response.content)
return compute.BackendService.from_json(
response.content, ignore_unknown_fields=True
)

def get_health(
self,
Expand Down Expand Up @@ -531,7 +535,9 @@ def get_health(
response.raise_for_status()

# Return the response
return compute.BackendServiceGroupHealth.from_json(response.content)
return compute.BackendServiceGroupHealth.from_json(
response.content, ignore_unknown_fields=True
)

def insert(
self,
Expand Down Expand Up @@ -617,7 +623,7 @@ def insert(
response.raise_for_status()

# Return the response
return compute.Operation.from_json(response.content)
return compute.Operation.from_json(response.content, ignore_unknown_fields=True)

def list(
self,
Expand Down Expand Up @@ -674,7 +680,9 @@ def list(
response.raise_for_status()

# Return the response
return compute.BackendServiceList.from_json(response.content)
return compute.BackendServiceList.from_json(
response.content, ignore_unknown_fields=True
)

def patch(
self,
Expand Down Expand Up @@ -762,7 +770,7 @@ def patch(
response.raise_for_status()

# Return the response
return compute.Operation.from_json(response.content)
return compute.Operation.from_json(response.content, ignore_unknown_fields=True)

def set_security_policy(
self,
Expand Down Expand Up @@ -850,7 +858,7 @@ def set_security_policy(
response.raise_for_status()

# Return the response
return compute.Operation.from_json(response.content)
return compute.Operation.from_json(response.content, ignore_unknown_fields=True)

def update(
self,
Expand Down Expand Up @@ -938,7 +946,7 @@ def update(
response.raise_for_status()

# Return the response
return compute.Operation.from_json(response.content)
return compute.Operation.from_json(response.content, ignore_unknown_fields=True)


__all__ = ("BackendServicesRestTransport",)
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ def aggregated_list(
response.raise_for_status()

# Return the response
return compute.DiskTypeAggregatedList.from_json(response.content)
return compute.DiskTypeAggregatedList.from_json(
response.content, ignore_unknown_fields=True
)

def get(
self,
Expand Down Expand Up @@ -218,7 +220,7 @@ def get(
response.raise_for_status()

# Return the response
return compute.DiskType.from_json(response.content)
return compute.DiskType.from_json(response.content, ignore_unknown_fields=True)

def list(
self,
Expand Down Expand Up @@ -272,7 +274,9 @@ def list(
response.raise_for_status()

# Return the response
return compute.DiskTypeList.from_json(response.content)
return compute.DiskTypeList.from_json(
response.content, ignore_unknown_fields=True
)


__all__ = ("DiskTypesRestTransport",)
Loading

0 comments on commit 3f9fc28

Please sign in to comment.