Skip to content

Conversation

@MartinSarkany
Copy link
Contributor

Pull Request Template

#4678

Description

This removes JsonProcessor from EncryptionOptions.
EncryptionOptions are used in RequestOptions that already contain JsonProcessor in RequestOptions.Properties dictionary. EncryptionOptions.JsonProcessor is redundant and cannot be used in RequestOptions subclasses that do not contain EncryptionOptions.

Type of change

  • [] Breaking change (fix or feature that would cause existing functionality to not work as expected)

/// <summary>
/// API for JSON processing
/// </summary>
public enum JsonProcessor
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to keep this public?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Depends on how we want users to set the processor in RequestOptions. RequestOptions.Properties can store it as enum or string. Do you suggest we only keep string? Or we add helper methods that set it without actually exposing the enum?

Copy link
Contributor

@adamnova adamnova Oct 21, 2025

Choose a reason for hiding this comment

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

At this point I would say we might as well keep it as a string. The API will likely only remain for "finite" amount of time and since we will not be adding the convenience extension as per Kiran's request I do not see much value in this enum being public.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I made it internal. Please review the changes.

},
Properties = new Dictionary<string, object>
{
{ "encryption-json-processor", JsonProcessor.Stream }
Copy link
Member

Choose a reason for hiding this comment

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

JsonProcessor is an internal type and not accessible for external usage.
Please update test exactly the way external CX use.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated tests to use string instead of enum.

@kirankumarkolli
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants