Skip to content

[DocumentIntelligence] DPG: FetchAnalyzeResultFromAnalyzeResultOperation is generated twice #41669

Open
@kinelski

Description

@kinelski

Code generation is mistakenly creating two copies of the FetchAnalyzeResultFromAnalyzeResultOperation method in DocumentIntelligenceClient, breaking the build.

As a workaround, we're forcibly suppressing their creation with the CodeGenSuppress attribute and adding a manual copy:

[CodeGenSuppress("FetchAnalyzeResultFromAnalyzeResultOperation", typeof(Response))]
public partial class DocumentIntelligenceClient
{
// CUSTOM CODE NOTE: code generation is mistakenly creating two copies of the
// FetchAnalyzeResultFromAnalyzeResultOperation method, breaking the build.
// We're forcibly suppressing their creation with the CodeGenSuppress attribute
// and adding a single copy here.
private AnalyzeResult FetchAnalyzeResultFromAnalyzeResultOperation(Response response)
{
var resultJsonElement = JsonDocument.Parse(response.Content).RootElement.GetProperty("analyzeResult");
return AnalyzeResult.DeserializeAnalyzeResult(resultJsonElement);
}

This seems to be a bug in the generator. Once fixed, we need to remove our workaround.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions