Skip to content

feat(codegen): consume x-adcp-open-payload in generated models #902

@bokelley

Description

@bokelley

Follow-up from adcontextprotocol/adcp#5178.

The schema PR adds x-adcp-open-payload to mark intentionally open JSON payload surfaces and adds schema-authoring validation that the keyword is boolean. The Python SDK generator path should consume this intentionally rather than relying on generic additionalProperties heuristics.

Expected work:

  • Add a codegen/post-processing rule for x-adcp-open-payload: true so datamodel-code-generator output preserves the intended open payload model.
  • Ensure x-adcp-open-payload: false does not collapse structured-but-extension-tolerant fields into generic payload types.
  • Add a smoke test using at least one annotated field from the 3.1 schema set.

Rationale: datamodel-code-generator will ignore this custom keyword by default, so without explicit SDK handling the annotation is documentation only for Python consumers.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions