azure-sdk-for-python icon indicating copy to clipboard operation
azure-sdk-for-python copied to clipboard

[azure-ai-contentunderstanding] update_analyzer docs should clarify which properties are updatable

Open chienyuanchang opened this issue 8 months ago • 0 comments

Description

The update_analyzer method in ContentUnderstandingClient currently has documentation that says only "Update analyzer properties" without specifying which properties can actually be updated.

The underlying REST API uses PATCH with application/merge-patch+json, and only description and tags are accepted by the service. All other properties (models, field_schema, config, base_analyzer_id, dynamic_field_schema, processing_location, knowledge_sources) are create-only — they are silently ignored by the server even though it returns HTTP 200.

Requested Improvements

  1. API doc (docstring): Add documentation to update_analyzer listing the updatable properties and noting that other properties require begin_create_analyzer with allow_replace=True.

  2. Samples: If an update analyzer sample exists, add a note explaining that only description and tags are updatable via this method, and reference begin_create_analyzer with allow_replace=True for changing models, field_schema, etc.

Updatable Properties

Property Updatable via update_analyzer (PATCH)?
description Yes
tags Yes
models No — silently ignored
field_schema No — silently ignored
config No — silently ignored
base_analyzer_id No — silently ignored
dynamic_field_schema No — silently ignored
processing_location No — silently ignored
knowledge_sources No — silently ignored

Workaround

To change create-only properties on an existing analyzer, use begin_create_analyzer with allow_replace=True. This calls PUT (full resource replacement) instead of PATCH.

Related

  • Azure/azure-sdk-for-net#57215 — customer report of UpdateAnalyzerAsync not updating models
  • Azure/azure-sdk-for-net#57231 — .NET documentation issue
  • Azure/azure-sdk-for-java#48469 — Java documentation issue
  • Azure/azure-sdk-for-js#37728 — JavaScript documentation issue

chienyuanchang avatar Mar 19 '26 02:03 chienyuanchang