Skip to content

Commit f58eec1

Browse files
fix: make SecretStore fields optional for backward compatibility
Mirror the change from the monorepo PR to keep schemas in sync. The previous required fields (name, secretStore) were invalid and pointed to non-existent properties, meaning the generated Pydantic models effectively treated all fields as optional. Making both type and alias explicitly optional maintains backward compatibility with existing behavior. All 304 connectors with secretStore entries already include both type and alias fields, so this change is purely for backward compatibility. Co-Authored-By: AJ Steers <aj@airbyte.io>
1 parent 3878e23 commit f58eec1

3 files changed

Lines changed: 5 additions & 10 deletions

File tree

airbyte_cdk/models/connector_metadata/resources/SecretStore.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
title: SecretStore
55
description: An object describing a secret store metadata
66
type: object
7-
required:
8-
- type
9-
- alias
107
additionalProperties: false
118
properties:
129
alias:

airbyte_cdk/test/models/connector_metadata/generated/metadata_schema.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,10 +1083,6 @@
10831083
"title": "SecretStore",
10841084
"description": "An object describing a secret store metadata",
10851085
"type": "object",
1086-
"required": [
1087-
"type",
1088-
"alias"
1089-
],
10901086
"additionalProperties": false,
10911087
"properties": {
10921088
"alias": {

airbyte_cdk/test/models/connector_metadata/generated/models.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,11 +272,13 @@ class SecretStore(BaseModel):
272272
class Config:
273273
extra = Extra.forbid
274274

275-
alias: str = Field(
276-
...,
275+
alias: Optional[str] = Field(
276+
None,
277277
description="The alias of the secret store which can map to its actual secret address",
278278
)
279-
type: Literal["GSM"] = Field(..., description="The type of the secret store")
279+
type: Optional[Literal["GSM"]] = Field(
280+
None, description="The type of the secret store"
281+
)
280282

281283

282284
class PyPi(BaseModel):

0 commit comments

Comments
 (0)