Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LINQ: Adds CustomPropertyNamingHandler to CosmosLinqSerializerOptions #3282

Closed

Conversation

YipingRuan
Copy link

@YipingRuan YipingRuan commented Jun 21, 2022

Pull Request Template

Description

Allow customized logic to be supplied so linq property name generation can honor JsonPropertyNameAttribute in System.Text.Json. Or any other logic.

  var option = new CosmosLinqSerializerOptions
  {
      CustomPropertyNamingHandler = (memberInfo) =>
      {
          var attr = memberInfo.GetCustomAttribute<JsonPropertyNameAttribute>(true);
          if (attr != null && !string.IsNullOrEmpty(attr.Name))
          {
              return attr.Name;
          }

          // Use the Property name
          return memberInfo.Name;
      }
  };

(Mimicking design of Serializer in CosmosClientOptions)

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Closing issues

#3250
#2685
#1006
To automatically close an issue: closes #IssueNumber

@ghost
Copy link

ghost commented Jun 21, 2022

CLA assistant check
All CLA requirements met.

@ealsur
Copy link
Member

ealsur commented Jun 21, 2022

@khdang please review

@ealsur ealsur added the LINQ label Jun 21, 2022
@ealsur
Copy link
Member

ealsur commented Jun 21, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@YipingRuan
Copy link
Author

@ealsur
Would you kindly trigger the Actions again? Or any other things needed from my end?

@ealsur
Copy link
Member

ealsur commented Jun 28, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@ealsur
Copy link
Member

ealsur commented Jun 28, 2022

@YipingRuan - Owner needs to review. @khdang kindly review this PR

@ealsur
Copy link
Member

ealsur commented Jun 28, 2022

/azp run

1 similar comment
@ealsur
Copy link
Member

ealsur commented Jun 29, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@YipingRuan YipingRuan force-pushed the users/yipingruan/customizememberName branch from 62491fc to 24041ed Compare September 4, 2022 13:37
@YipingRuan
Copy link
Author

@khdang I have adjusted test case, help review again.

@ealsur Trigger Azure Pipelines once more? Thanks!

@YipingRuan YipingRuan requested review from khdang and removed request for j82w September 5, 2022 00:44
@ealsur
Copy link
Member

ealsur commented Sep 6, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ealsur ealsur changed the title Add CustomPropertyNamingHandler to CosmosLinqSerializerOptions LINQ: Adds CustomPropertyNamingHandler to CosmosLinqSerializerOptions Sep 6, 2022
@ealsur ealsur enabled auto-merge (squash) September 6, 2022 21:47
@gorillapower
Copy link

Will this be in the next release?

@ealsur
Copy link
Member

ealsur commented Sep 28, 2022

@gorillapower This PR is not merged, so no. It is waiting for review from the owners. @khdang could you review?

@kirankumarkolli
Copy link
Member

/azp run

@mlowijs
Copy link

mlowijs commented Dec 21, 2022

What is the status on this? We cannot use custom property names for querying now.

@gorillapower
Copy link

👋 This would be super useful for us, any idea if it will be in the upcoming release(s)?

@sven5
Copy link

sven5 commented Jun 20, 2023

@khdang could you please update with an eta?

@Maya-Painter
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@clazarr
Copy link

clazarr commented Sep 24, 2023

Still waiting for this to go in and be released.

@kirankumarkolli
Copy link
Member

Closing inactive PRs older than 3-months, please re-active it needed.

auto-merge was automatically disabled September 13, 2024 18:52

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants