Skip to content

Conversation

@aaronsteers
Copy link
Contributor

@aaronsteers aaronsteers commented Nov 9, 2025

schema: centralize $parameters via YAML anchor; add title/description

Summary

Centralizes the $parameters schema definition using a single YAML anchor and merges it into all 71 component definitions. This eliminates duplicated schema blocks and adds consistent title/description metadata for $parameters across the schema. No runtime behavior changes.

Changes vs main

  • YAML schema: Add top-level anchor x-parameters-definition: &parameters-definition with title "$parameters", description (explaining parameter propagation), type: object, and additionalProperties: true
  • YAML schema: Replace 71 duplicated inline blocks with one-liner anchor merge: $parameters: { <<: *parameters-definition }
  • Generated Python models: Regenerated with poe build. The parameters field remains Optional[Dict[str, Any]] (alias "$parameters") but now includes consistent title/description metadata in Field()

Impact

  • DRY schema: Single source of truth for $parameters definition (easier maintenance)
  • Better documentation: Consistent title/description appears in generated Python models (better IDE hints)
  • No behavioral change: Types remain Optional[Dict[str, Any]], existing configs continue to work

Review & Testing Checklist for Human

  • Run poe build locally - Verify generated models match the PR (confirms YAML anchor resolution works correctly)
  • Verify generated type - Spot-check that parameters fields are Optional[Dict[str, Any]], NOT a BaseModel class
  • Test a connector with $parameters - Pick a connector using $parameters (e.g., Stripe) and verify it still works
  • Check CI MyPy results - Ensure MyPy passes in CI (I verified locally but CI is the source of truth)
  • Review generated Field() metadata - Spot-check a few components to confirm title/description look correct

Notes

  • The YAML change is small (5 lines added, 71 two-liners converted to one-liners), but the generated Python diff is large (502 insertions, 286 deletions) because Field() metadata is now present in 71 places
  • YAML anchors are resolved at parse time by datamodel-codegen, so it sees 71 identical inline blocks and generates Dict[str, Any] (not a BaseModel)
  • Local verification: poe build completed successfully, MyPy passes on model_to_component_factory.py
  • Requested by: AJ Steers (@aaronsteers)
  • Session: https://app.devin.ai/sessions/dc10fcdabf624323a9bef22bae444da8

…schema

- Add title and description to all $parameters fields in the schema
- Explain automatic parameter propagation mechanism
- Document that parameters are applied to component fields when not already set
- Link to comprehensive documentation page for details
- This description will appear in the Connector Builder UI and YAML Reference docs

Requested by: AJ Steers (@aaronsteers)

Co-Authored-By: AJ Steers <aj@airbyte.io>
Copilot AI review requested due to automatic review settings November 9, 2025 05:10
@devin-ai-integration
Copy link
Contributor

Original prompt from AJ Steers
Received message in Slack channel #ask-devin-ai:

**Spec Work for Adding Fetch and Write to existing Declarative CDK*

@Devin - Please review the Python CDK declarative YAML spec/DSL. We're going to create a plan to add get and set implementations for the APIs. I want to explore ways to do this that are declarative in yamil, and or could be inferred already for what is declared in existing yamil sources. We currently have retrievers, I believe, and I don't know if some, all or no cases we might already have enough information to perform a get or set operation in cases where the API follows traditional patterns. Of course some APIs will require custom instructions, let's see if we can target first those could have generic and viable default implementations.

In terms of how these would be called, a minimal "get" would pass filters in terms of one or more primary keys to fetch per stream and those filters or indexes to fetch we provided within the configured catalog, adjacent to what we currently use to select streams. Instead of only selecting which streams would be selecting which streams and which records or which subset of records to fetch. 

The minimal right implementation would be to assume that the JSON schema that applies to the get also applies to any rights and presuming we know the primary key or we omit the primary key during creation and retrieve it after creation. One of those paradigms would be passed to the write operation.
Thread URL: https://airbytehq-team.slack.com/archives/C08BHPUMEPJ/p1762624184067419

@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@github-actions github-actions bot added the docs label Nov 9, 2025
@github-actions
Copy link

github-actions bot commented Nov 9, 2025

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

Testing This CDK Version

You can test this version of the CDK using the following:

# Run the CLI from this branch:
uvx 'git+https://github.com/airbytehq/airbyte-python-cdk.git@devin/1762664873-improve-parameters-schema-description#egg=airbyte-python-cdk[dev]' --help

# Update a connector to use the CDK from this branch ref:
cd airbyte-integrations/connectors/source-example
poe use-cdk-branch devin/1762664873-improve-parameters-schema-description

Helpful Resources

PR Slash Commands

Airbyte Maintainers can execute the following slash commands on your PR:

  • /autofix - Fixes most formatting and linting issues
  • /poetry-lock - Updates poetry.lock file
  • /test - Runs connector tests with the updated CDK
  • /poe build - Regenerate git-committed build artifacts, such as the pydantic models which are generated from the manifest JSON schema in YAML.
  • /poe <command> - Runs any poe command in the CDK environment

📝 Edit this welcome message.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds inline documentation to the $parameters field throughout the declarative component schema, explaining the automatic parameter propagation mechanism that occurs in the Connector Builder framework. This documentation will be visible in the Connector Builder UI, YAML Reference documentation, and IDE autocomplete/tooltips.

  • Added title and description fields to 73 $parameters definitions
  • The description explains automatic parameter application, recursive propagation, and links to comprehensive documentation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 9, 2025

📝 Walkthrough

Walkthrough

Centralized the $parameters definition in the YAML schema and standardized $parameters Field metadata across Python declarative models: YAML now merges a single parameters anchor into many definitions; Python models preserve the $parameters alias but gain a descriptive title and description.

Changes

Cohort / File(s) Summary
Schema: centralized parameters anchor
airbyte_cdk/sources/declarative/declarative_component_schema.yaml
Added x-parameters-definition anchor and replaced inline $parameters object declarations with a merge reference ($parameters: { <<: *parameters-definition }) across many component definitions (auth, streams, resolvers, custom components, backoff/pagination, error handlers, etc.).
Python models: $parameters field metadata additions
airbyte_cdk/sources/declarative/models/declarative_component_schema.py
Replaced parameters: Optional[Dict[str, Any]] = Field(None, alias="$parameters") with Field(None, alias="$parameters", description=..., title="$parameters") in many BaseModel classes (authenticators, pagination/backoff strategies, custom components, stream/config/resolver types, DynamicDeclarativeStream, etc.). Type and alias behavior unchanged; only metadata added.

Sequence Diagram(s)

(omitted — schema/model-only changes; no control-flow modifications)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Focus areas:
    • Verify the YAML anchor merge (<<: *parameters-definition) was applied consistently and no inline $parameters object blocks remain.
    • Confirm Python Field(..., alias="$parameters", description=..., title=...) usages keep the original type (Optional[Dict[str, Any]]) and necessary imports.
    • Spot-check representative classes (an authenticator, a stream, a resolver) for serialization/deserialization and alias preservation.

Possibly related PRs

Suggested labels

chore

Suggested reviewers

  • bazarnov
  • aldogonzalez8

Would you like a short checklist of two or three serialization/deserialization tests I can add to validate representative components, wdyt?

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding inline descriptions to the $parameters field in the declarative component schema.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch devin/1762664873-improve-parameters-schema-description

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6504148 and 1b8aa0b.

📒 Files selected for processing (1)
  • airbyte_cdk/sources/declarative/declarative_component_schema.yaml (73 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2024-11-18T23:40:06.391Z
Learnt from: ChristoGrab
Repo: airbytehq/airbyte-python-cdk PR: 58
File: airbyte_cdk/sources/declarative/yaml_declarative_source.py:0-0
Timestamp: 2024-11-18T23:40:06.391Z
Learning: When modifying the `YamlDeclarativeSource` class in `airbyte_cdk/sources/declarative/yaml_declarative_source.py`, avoid introducing breaking changes like altering method signatures within the scope of unrelated PRs. Such changes should be addressed separately to minimize impact on existing implementations.

Applied to files:

  • airbyte_cdk/sources/declarative/declarative_component_schema.yaml
📚 Learning: 2024-12-11T16:34:46.319Z
Learnt from: pnilan
Repo: airbytehq/airbyte-python-cdk PR: 0
File: :0-0
Timestamp: 2024-12-11T16:34:46.319Z
Learning: In the airbytehq/airbyte-python-cdk repository, the `declarative_component_schema.py` file is auto-generated from `declarative_component_schema.yaml` and should be ignored in the recommended reviewing order.

Applied to files:

  • airbyte_cdk/sources/declarative/declarative_component_schema.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (16)
  • GitHub Check: Check: source-pokeapi
  • GitHub Check: Check: source-intercom
  • GitHub Check: Check: source-hardcoded-records
  • GitHub Check: Check: destination-motherduck
  • GitHub Check: Check: source-shopify
  • GitHub Check: MyPy Check
  • GitHub Check: Pytest (Fast)
  • GitHub Check: Pytest (All, Python 3.11, Ubuntu)
  • GitHub Check: Pytest (All, Python 3.12, Ubuntu)
  • GitHub Check: Pytest (All, Python 3.13, Ubuntu)
  • GitHub Check: Pytest (All, Python 3.10, Ubuntu)
  • GitHub Check: preview_docs
  • GitHub Check: Manifest Server Docker Image Build
  • GitHub Check: SDM Docker Image Build
  • GitHub Check: Analyze (python)
  • GitHub Check: Analyze (python)

@github-actions
Copy link

github-actions bot commented Nov 9, 2025

PyTest Results (Fast)

3 817 tests  ±0   3 806 ✅ +1   7m 13s ⏱️ +30s
    1 suites ±0      11 💤  - 1 
    1 files   ±0       0 ❌ ±0 

Results for commit fd9aba8. ± Comparison against base commit 6504148.

♻️ This comment has been updated with latest results.

devin-ai-integration bot and others added 2 commits November 9, 2025 05:21
- Add ParametersProp definition in definitions section
- Replace 71 inline $parameters blocks with $ref to ParametersProp
- Run poe build to regenerate Pydantic models
- This makes the schema more maintainable by defining the $parameters description once

Co-Authored-By: AJ Steers <aj@airbyte.io>
…roach

Co-Authored-By: AJ Steers <aj@airbyte.io>
@github-actions
Copy link

github-actions bot commented Nov 9, 2025

PyTest Results (Full)

3 820 tests   3 808 ✅  11m 1s ⏱️
    1 suites     12 💤
    1 files        0 ❌

Results for commit fd9aba8.

♻️ This comment has been updated with latest results.

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
airbyte_cdk/sources/declarative/models/declarative_component_schema.py (2)

1-3: Address the Ruff formatting issue.

The pipeline indicates this file needs formatting. Since this is an auto-generated file, you'll want to run the formatter after regeneration.

Run the following command to fix the formatting:

poetry run ruff format airbyte_cdk/sources/declarative/models/declarative_component_schema.py

2002-2002: Update these 3 classes to use ParametersProp for consistency with the rest of the codebase.

The verification confirms a genuine inconsistency. Out of 73+ parameter field definitions in the file, 71 use Optional[ParametersProp] while only 3 outliers still use Optional[Dict[str, Any]]: DefaultErrorHandler (line 2002), DeclarativeStream (line 2537), and CustomConfigTransformation (line 1476).

Since ParametersProp is a simple BaseModel with extra = Extra.allow that's functionally equivalent to Dict[str, Any], there's no apparent semantic reason for the divergence. These three should align with the established pattern, wdyt?

🧹 Nitpick comments (1)
airbyte_cdk/sources/declarative/models/declarative_component_schema.py (1)

16-20: Consider adding documentation to ParametersProp.

The new ParametersProp class serves as a centralized type for the $parameters field but lacks a docstring explaining its purpose and behavior. While I understand this file is auto-generated from the YAML schema, would it make sense to add documentation in the source YAML that would appear here? This would help developers understand that this class accepts arbitrary additional parameters through the extra = Extra.allow configuration.

Based on learnings.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b4f0e82 and 01eb85c.

📒 Files selected for processing (1)
  • airbyte_cdk/sources/declarative/models/declarative_component_schema.py (68 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: ChristoGrab
Repo: airbytehq/airbyte-python-cdk PR: 58
File: airbyte_cdk/sources/declarative/yaml_declarative_source.py:0-0
Timestamp: 2024-11-18T23:40:06.391Z
Learning: When modifying the `YamlDeclarativeSource` class in `airbyte_cdk/sources/declarative/yaml_declarative_source.py`, avoid introducing breaking changes like altering method signatures within the scope of unrelated PRs. Such changes should be addressed separately to minimize impact on existing implementations.
📚 Learning: 2024-12-11T16:34:46.319Z
Learnt from: pnilan
Repo: airbytehq/airbyte-python-cdk PR: 0
File: :0-0
Timestamp: 2024-12-11T16:34:46.319Z
Learning: In the airbytehq/airbyte-python-cdk repository, the `declarative_component_schema.py` file is auto-generated from `declarative_component_schema.yaml` and should be ignored in the recommended reviewing order.

Applied to files:

  • airbyte_cdk/sources/declarative/models/declarative_component_schema.py
📚 Learning: 2024-11-18T23:40:06.391Z
Learnt from: ChristoGrab
Repo: airbytehq/airbyte-python-cdk PR: 58
File: airbyte_cdk/sources/declarative/yaml_declarative_source.py:0-0
Timestamp: 2024-11-18T23:40:06.391Z
Learning: When modifying the `YamlDeclarativeSource` class in `airbyte_cdk/sources/declarative/yaml_declarative_source.py`, avoid introducing breaking changes like altering method signatures within the scope of unrelated PRs. Such changes should be addressed separately to minimize impact on existing implementations.

Applied to files:

  • airbyte_cdk/sources/declarative/models/declarative_component_schema.py
🧬 Code graph analysis (1)
airbyte_cdk/sources/declarative/models/declarative_component_schema.py (4)
airbyte_cdk/sources/declarative/models/base_model_with_deprecations.py (1)
  • Config (44-49)
airbyte_cdk/sources/declarative/extractors/response_to_file_extractor.py (1)
  • ResponseToFileExtractor (23-176)
airbyte_cdk/sources/declarative/resolvers/config_components_resolver.py (2)
  • ConfigComponentsResolver (46-211)
  • StreamConfig (29-41)
airbyte_cdk/sources/declarative/resolvers/components_resolver.py (1)
  • ComponentMappingDefinition (17-27)
🪛 GitHub Actions: Linters
airbyte_cdk/sources/declarative/models/declarative_component_schema.py

[error] 14-14: Ruff formatting required. 1 file would be reformatted. Run 'poetry run ruff format .' to fix code style issues.

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (14)
  • GitHub Check: Check: source-hardcoded-records
  • GitHub Check: Check: source-pokeapi
  • GitHub Check: Check: destination-motherduck
  • GitHub Check: Check: source-intercom
  • GitHub Check: Check: source-shopify
  • GitHub Check: Analyze (python)
  • GitHub Check: Pytest (Fast)
  • GitHub Check: Analyze (python)
  • GitHub Check: Pytest (All, Python 3.11, Ubuntu)
  • GitHub Check: Pytest (All, Python 3.13, Ubuntu)
  • GitHub Check: Pytest (All, Python 3.12, Ubuntu)
  • GitHub Check: Pytest (All, Python 3.10, Ubuntu)
  • GitHub Check: Manifest Server Docker Image Build
  • GitHub Check: SDM Docker Image Build

devin-ai-integration bot and others added 2 commits November 9, 2025 06:15
Replace JSON Schema $ref with YAML anchors to achieve DRY schema while
avoiding Pydantic BaseModel generation that caused MyPy type errors.

- Add YAML anchor definition (x-parameters-definition) at top of schema
- Replace 71 $ref occurrences with anchor merges (<<: *parameters-definition)
- Generated models now use Dict[str, Any] instead of ParametersProp
- All 84 MyPy errors resolved with zero code changes to model_to_component_factory.py

This approach preserves DRY in the source YAML while generating type-compatible
Python models that work seamlessly with existing code.

Co-Authored-By: AJ Steers <aj@airbyte.io>
Co-Authored-By: AJ Steers <aj@airbyte.io>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
airbyte_cdk/sources/declarative/declarative_component_schema.yaml (1)

1811-1813: Incomplete migration: DefaultErrorHandler $parameters not converted to anchor pattern; typo present.

The $parameters block here remains inline and has the same typo as DeclarativeStream: additional_properties (line 1813) should be additionalProperties.

Apply this diff to fix:

       $parameters:
-        type: object
-        additional_properties: true
+        <<: *parameters-definition
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 01eb85c and 4d38148.

📒 Files selected for processing (2)
  • airbyte_cdk/sources/declarative/declarative_component_schema.yaml (72 hunks)
  • airbyte_cdk/sources/declarative/models/declarative_component_schema.py (67 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: ChristoGrab
Repo: airbytehq/airbyte-python-cdk PR: 58
File: airbyte_cdk/sources/declarative/yaml_declarative_source.py:0-0
Timestamp: 2024-11-18T23:40:06.391Z
Learning: When modifying the `YamlDeclarativeSource` class in `airbyte_cdk/sources/declarative/yaml_declarative_source.py`, avoid introducing breaking changes like altering method signatures within the scope of unrelated PRs. Such changes should be addressed separately to minimize impact on existing implementations.
📚 Learning: 2024-11-18T23:40:06.391Z
Learnt from: ChristoGrab
Repo: airbytehq/airbyte-python-cdk PR: 58
File: airbyte_cdk/sources/declarative/yaml_declarative_source.py:0-0
Timestamp: 2024-11-18T23:40:06.391Z
Learning: When modifying the `YamlDeclarativeSource` class in `airbyte_cdk/sources/declarative/yaml_declarative_source.py`, avoid introducing breaking changes like altering method signatures within the scope of unrelated PRs. Such changes should be addressed separately to minimize impact on existing implementations.

Applied to files:

  • airbyte_cdk/sources/declarative/declarative_component_schema.yaml
  • airbyte_cdk/sources/declarative/models/declarative_component_schema.py
📚 Learning: 2024-12-11T16:34:46.319Z
Learnt from: pnilan
Repo: airbytehq/airbyte-python-cdk PR: 0
File: :0-0
Timestamp: 2024-12-11T16:34:46.319Z
Learning: In the airbytehq/airbyte-python-cdk repository, the `declarative_component_schema.py` file is auto-generated from `declarative_component_schema.yaml` and should be ignored in the recommended reviewing order.

Applied to files:

  • airbyte_cdk/sources/declarative/declarative_component_schema.yaml
  • airbyte_cdk/sources/declarative/models/declarative_component_schema.py
📚 Learning: 2024-11-15T01:04:21.272Z
Learnt from: aaronsteers
Repo: airbytehq/airbyte-python-cdk PR: 58
File: airbyte_cdk/cli/source_declarative_manifest/_run.py:62-65
Timestamp: 2024-11-15T01:04:21.272Z
Learning: The files in `airbyte_cdk/cli/source_declarative_manifest/`, including `_run.py`, are imported from another repository, and changes to these files should be minimized or avoided when possible to maintain consistency.

Applied to files:

  • airbyte_cdk/sources/declarative/declarative_component_schema.yaml
🧬 Code graph analysis (1)
airbyte_cdk/sources/declarative/models/declarative_component_schema.py (4)
airbyte_cdk/sources/declarative/extractors/response_to_file_extractor.py (1)
  • ResponseToFileExtractor (23-176)
airbyte_cdk/sources/declarative/auth/declarative_authenticator.py (1)
  • NoAuth (33-42)
airbyte_cdk/sources/declarative/resolvers/config_components_resolver.py (2)
  • ConfigComponentsResolver (46-211)
  • StreamConfig (29-41)
airbyte_cdk/sources/declarative/resolvers/components_resolver.py (1)
  • ComponentMappingDefinition (17-27)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (15)
  • GitHub Check: Check: source-pokeapi
  • GitHub Check: Check: source-intercom
  • GitHub Check: Check: destination-motherduck
  • GitHub Check: Check: source-hardcoded-records
  • GitHub Check: Check: source-shopify
  • GitHub Check: SDM Docker Image Build
  • GitHub Check: Manifest Server Docker Image Build
  • GitHub Check: preview_docs
  • GitHub Check: Pytest (All, Python 3.11, Ubuntu)
  • GitHub Check: Pytest (All, Python 3.10, Ubuntu)
  • GitHub Check: Pytest (All, Python 3.13, Ubuntu)
  • GitHub Check: Pytest (All, Python 3.12, Ubuntu)
  • GitHub Check: Pytest (Fast)
  • GitHub Check: Analyze (python)
  • GitHub Check: Analyze (python)
🔇 Additional comments (5)
airbyte_cdk/sources/declarative/declarative_component_schema.yaml (3)

7-11: Centralized $parameters definition successfully introduced.

The new YAML anchor pattern is clean and reusable. Good use of <<: *parameters-definition throughout the file to DRY out parameter metadata.


4709-4712: CustomConfigTransformation $parameters was not converted to anchor pattern; custom description remains inline.

Unlike the majority of converted components, the $parameters block here retains an inline definition with a custom description: "Additional parameters to be passed to the custom config transformation."

Wdyt—should this custom description be preserved (in which case it's correct to stay inline), or should it be standardized to use the centralized anchor and drop the component-specific description for consistency?

If you'd like to keep the custom description, this is fine as-is. If standardization is preferred, apply:

       $parameters:
-        type: object
-        description: Additional parameters to be passed to the custom config transformation.
-        additionalProperties: true
+        <<: *parameters-definition

7-4712: I found several components with inline $parameters definitions that weren't converted to use the anchor merge. Let me dig deeper to understand if this is intentional:Now let me count the actual number of occurrences to verify the claim:Based on my analysis of the script output and the provided code, I can now provide the rewritten review comment:

Several $parameters definitions still use inline expansion instead of anchor merge.

The script found 8+ locations where $parameters is defined inline with type: object and additional_properties rather than using <<: *parameters-definition. Components like DeclarativeStream, DefaultErrorHandler, HTTPAPIBudget, and DefaultPaginator appear to be candidates for conversion—they don't include additional properties beyond what the anchor provides.

However, CustomConfigTransformation includes a custom description field, which would justify its inline definition since the anchor can't accommodate component-specific metadata. Wdyt—should these inline definitions without custom properties be converted to use the anchor pattern for consistency, or were they intentionally left inline?

airbyte_cdk/sources/declarative/models/declarative_component_schema.py (2)

1-3: Auto-generated file from YAML schema

Based on learnings, this file is auto-generated from declarative_component_schema.yaml, so any necessary changes should typically be made to the source YAML and regenerated rather than edited directly here. I'll focus on consistency checks rather than detailed code review.

Based on learnings


2251-2251: Inconsistency in $parameters field metadata confirmed

Verification confirms that both DefaultErrorHandler (line 2251) and DeclarativeStream (line 2826) are missing the description and title metadata that all other $parameters field additions throughout this file include. Every other class follows the pattern of a multi-line Field definition with descriptive metadata, while only these two use the bare single-line format.

Was this intentional, or should both be updated to match the established convention? Wdyt?

Convert all 71 $parameters anchor merges from two-liner to one-liner format:
- Before: $parameters:\n        <<: *parameters-definition
- After: $parameters: { <<: *parameters-definition }

This improves readability while maintaining identical YAML semantics and
generated Python code. MyPy verification confirms no behavioral changes.

Co-Authored-By: AJ Steers <aj@airbyte.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants