Skip to content

Commit

Permalink
source-braintree-native: fix nullable key on full refresh resources
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Bair committed Dec 9, 2024
1 parent e637677 commit 1c80e71
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 63 deletions.
2 changes: 1 addition & 1 deletion source-braintree-native/source_braintree_native/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class Advanced(BaseModel):


class FullRefreshResource(BaseDocument, extra="allow"):
id: str | None
pass


class IncrementalResource(BaseDocument, extra="allow"):
Expand Down
4 changes: 2 additions & 2 deletions source-braintree-native/source_braintree_native/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ def open(
gateway_property,
gateway_response_field,
),
tombstone=FullRefreshResource(_meta=FullRefreshResource.Meta(op="d"), id=None)
tombstone=FullRefreshResource(_meta=FullRefreshResource.Meta(op="d"))
)

return [
common.Resource(
name=name,
key=["/id"],
key=["/_meta/row_id"],
model=FullRefreshResource,
open=functools.partial(open, _create_gateway(config), gateway_property, gateway_response_field),
initial_state=ResourceState(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,28 +40,14 @@
"row_id": -1
},
"description": "Document metadata"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Id"
}
},
"required": [
"id"
],
"title": "FullRefreshResource",
"type": "object",
"x-infer-schema": true
},
"key": [
"/id"
"/_meta/row_id"
]
},
{
Expand Down Expand Up @@ -105,28 +91,14 @@
"row_id": -1
},
"description": "Document metadata"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Id"
}
},
"required": [
"id"
],
"title": "FullRefreshResource",
"type": "object",
"x-infer-schema": true
},
"key": [
"/id"
"/_meta/row_id"
]
},
{
Expand Down Expand Up @@ -170,28 +142,14 @@
"row_id": -1
},
"description": "Document metadata"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Id"
}
},
"required": [
"id"
],
"title": "FullRefreshResource",
"type": "object",
"x-infer-schema": true
},
"key": [
"/id"
"/_meta/row_id"
]
},
{
Expand Down Expand Up @@ -235,28 +193,14 @@
"row_id": -1
},
"description": "Document metadata"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Id"
}
},
"required": [
"id"
],
"title": "FullRefreshResource",
"type": "object",
"x-infer-schema": true
},
"key": [
"/id"
"/_meta/row_id"
]
},
{
Expand Down

0 comments on commit 1c80e71

Please sign in to comment.