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

Add developer driven evolution document #27559

Merged
merged 8 commits into from
Apr 8, 2022
Merged

Conversation

pshao25
Copy link
Member

@pshao25 pshao25 commented Mar 15, 2022

@check-enforcer
Copy link

This pull request is protected by Check Enforcer.
For more information about how to run a pipeline against this pull request, see this.

@annelo-msft
Copy link
Member

Would you please link the PR to the issue by putting "Fixes " in the issue description?

Copy link
Member

@annelo-msft annelo-msft left a comment

Choose a reason for hiding this comment

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

I think we can restructure this to simplify it a bit. Instead of enumerating GET/PUT/POST/etc., what if we gave the rules for writing a convenience API?

  • Replace the RequestContext parameter with CancellationToken
  • Replace the input parameter RequestContent with a model type
  • Replace the return value Response with Response<T>
  • If you end up with an ambiguous call-site, rename the method
    • Add suffix Value or Values
    • If this isn't a good name, pick a good name for the method
  • Create the models for the convenience APIs you've added

@pshao25
Copy link
Member Author

pshao25 commented Mar 16, 2022

I think we can restructure this to simplify it a bit. Instead of enumerating GET/PUT/POST/etc., what if we gave the rules for writing a convenience API?

  • Replace the RequestContext parameter with CancellationToken

  • Replace the input parameter RequestContent with a model type

  • Replace the return value Response with Response

  • If you end up with an ambiguous call-site, rename the method

    • Add suffix Value or Values
    • If this isn't a good name, pick a good name for the method
  • Create the models for the convenience APIs you've added

Yes, I do follow this by giving rules, and I added more rules as you listed above. Enumerating GET/PUT/POST/etc. is just examples for how to improve to grow up method.

Copy link
Member

@annelo-msft annelo-msft left a comment

Choose a reason for hiding this comment

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

Thanks!

We'll want to make sure we sort out the diagnostic scope questions and provide guidance for that before we GA -- @pshao25, would you create a separate issue for this, so we don't block this PR on that?

@pshao25
Copy link
Member Author

pshao25 commented Mar 28, 2022

diagnostic scope

@pshao25 pshao25 closed this Mar 28, 2022
@pshao25 pshao25 reopened this Mar 28, 2022
@pshao25
Copy link
Member Author

pshao25 commented Mar 29, 2022

Thanks!

We'll want to make sure we sort out the diagnostic scope questions and provide guidance for that before we GA -- @pshao25, would you create a separate issue for this, so we don't block this PR on that?

Yes, created here: Azure/autorest.csharp#2115

@annelo-msft annelo-msft mentioned this pull request Mar 30, 2022
@lirenhe lirenhe added the DPG label Apr 7, 2022
@pshao25 pshao25 marked this pull request as ready for review April 7, 2022 03:07
Copy link
Member

@lirenhe lirenhe left a comment

Choose a reason for hiding this comment

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

LGTM

@pshao25
Copy link
Member Author

pshao25 commented Apr 8, 2022

/check-enforcer override

@pshao25 pshao25 merged commit 8adf98b into Azure:main Apr 8, 2022
@pshao25 pshao25 deleted the developerDoc branch April 8, 2022 08:50
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.

3 participants