Skip to content

Bug: data_product_create_and_attach_custom_contract fails with 400 Validation Error due to unrecognized fields in API payload #32

@koheeee

Description

@koheeee

Summary

data_product_create_and_attach_custom_contract returns HTTP 400 because the schema template includes fields not recognized by the Data Product Hub API.

Error

Validation Error (Status: 400): Unrecognized field "organization"
(class com.ibm.dph.model.DataProductContractTerms)

Root Cause

The schema returned by the tool includes fields such as organization, roles, price, and support_and_communication. These are merged into the API payload (even when null), but the API does not recognize them and rejects the request.

Minimal Reproduction

Call the tool with any contract_terms payload — the merged schema will always include the unsupported fields.

Suggested Fix

Remove or comment out the unsupported fields from:

  • get_contract_terms_schema_documentation()
  • get_full_contract_terms_empty_values()

I have a local fix ready. However, I noticed the repository is synced from an internal IBM enterprise repository (Sync from Enterprise commit history).

Could you advise the appropriate channel to contribute this fix?
For example, an internal issue tracker or contact person would be helpful.

Workaround

Use data_product_attach_url_contract_to_data_product instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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