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

Inlcude csharp rename decorator when openai-to-typespec generating tsp #4907

Merged
merged 18 commits into from
Mar 19, 2024

Conversation

RodgeFu
Copy link
Member

@RodgeFu RodgeFu commented Mar 12, 2024

Fixes Azure/autorest.csharp#4236.
Generate csharp renaming decorator when openai-to-typespec generating tsp. (include rename of resource, resource.property, model, model.property, enum, enum.member and operation name)

related autorest.csharp change can be found at Azure/autorest.csharp#4380

Copy link

You may test this build by running autorest --reset and then either:


Add the following CLI flags
Pacakge Flag Description
@autorest/core --version:https://tinyurl.com/2yo8u522 For changes to autorest core.
@autorest/modelerfour --use:https://tinyurl.com/2dcckehg For changes to modelerfour.

Or with all

autorest --version:https://tinyurl.com/2yo8u522 --use:https://tinyurl.com/2dcckehg

or use the following in your autorest configuration:
# For changes to autorest core
version: "https://tinyurl.com/2yo8u522"

# For changes to modelerfour
use-extension:
  "@autorest/modelerfour": "https://tinyurl.com/2dcckehg"

If this build is good for you, give this comment a thumbs up. (👍) And you should run `autorest --reset` again once you're finished testing to remove it.

Copy link

You may test this build by running autorest --reset and then either:


Add the following CLI flags
Pacakge Flag Description
@autorest/core --version:https://tinyurl.com/22rkfbl8 For changes to autorest core.
@autorest/modelerfour --use:https://tinyurl.com/27a3yxzy For changes to modelerfour.

Or with all

autorest --version:https://tinyurl.com/22rkfbl8 --use:https://tinyurl.com/27a3yxzy

or use the following in your autorest configuration:
# For changes to autorest core
version: "https://tinyurl.com/22rkfbl8"

# For changes to modelerfour
use-extension:
  "@autorest/modelerfour": "https://tinyurl.com/27a3yxzy"

If this build is good for you, give this comment a thumbs up. (👍) And you should run `autorest --reset` again once you're finished testing to remove it.

Copy link

You may test this build by running autorest --reset and then either:


Add the following CLI flags
Pacakge Flag Description
@autorest/core --version:https://tinyurl.com/29zmp32p For changes to autorest core.
@autorest/modelerfour --use:https://tinyurl.com/25dgnrwk For changes to modelerfour.

Or with all

autorest --version:https://tinyurl.com/29zmp32p --use:https://tinyurl.com/25dgnrwk

or use the following in your autorest configuration:
# For changes to autorest core
version: "https://tinyurl.com/29zmp32p"

# For changes to modelerfour
use-extension:
  "@autorest/modelerfour": "https://tinyurl.com/25dgnrwk"

If this build is good for you, give this comment a thumbs up. (👍) And you should run `autorest --reset` again once you're finished testing to remove it.

Copy link

You may test this build by running autorest --reset and then either:


Add the following CLI flags
Pacakge Flag Description
@autorest/core --version:https://tinyurl.com/26hoqkrg For changes to autorest core.
@autorest/modelerfour --use:https://tinyurl.com/22je3wv3 For changes to modelerfour.

Or with all

autorest --version:https://tinyurl.com/26hoqkrg --use:https://tinyurl.com/22je3wv3

or use the following in your autorest configuration:
# For changes to autorest core
version: "https://tinyurl.com/26hoqkrg"

# For changes to modelerfour
use-extension:
  "@autorest/modelerfour": "https://tinyurl.com/22je3wv3"

If this build is good for you, give this comment a thumbs up. (👍) And you should run `autorest --reset` again once you're finished testing to remove it.

@tadelesh
Copy link
Member

another concern: if i change the script to use this latest converter version without using the latest csharp codegen version, there will be no error, right? is it backward compatible?

Copy link

You may test this build by running autorest --reset and then either:


Add the following CLI flags
Pacakge Flag Description
@autorest/core --version:https://tinyurl.com/24l3cogo For changes to autorest core.
@autorest/modelerfour --use:https://tinyurl.com/2depyzzf For changes to modelerfour.

Or with all

autorest --version:https://tinyurl.com/24l3cogo --use:https://tinyurl.com/2depyzzf

or use the following in your autorest configuration:
# For changes to autorest core
version: "https://tinyurl.com/24l3cogo"

# For changes to modelerfour
use-extension:
  "@autorest/modelerfour": "https://tinyurl.com/2depyzzf"

If this build is good for you, give this comment a thumbs up. (👍) And you should run `autorest --reset` again once you're finished testing to remove it.

@RodgeFu
Copy link
Member Author

RodgeFu commented Mar 19, 2024

another concern: if i change the script to use this latest converter version without using the latest csharp codegen version, there will be no error, right? is it backward compatible?

There should be no change if a normal swagger config is used. The change should only have impact when an autorest.md with csharp related rename configuration is used. and all test passed. thanks.

Copy link

You may test this build by running autorest --reset and then either:


Add the following CLI flags
Pacakge Flag Description
@autorest/core --version:https://tinyurl.com/2xmrc92x For changes to autorest core.
@autorest/modelerfour --use:https://tinyurl.com/2635h6cn For changes to modelerfour.

Or with all

autorest --version:https://tinyurl.com/2xmrc92x --use:https://tinyurl.com/2635h6cn

or use the following in your autorest configuration:
# For changes to autorest core
version: "https://tinyurl.com/2xmrc92x"

# For changes to modelerfour
use-extension:
  "@autorest/modelerfour": "https://tinyurl.com/2635h6cn"

If this build is good for you, give this comment a thumbs up. (👍) And you should run `autorest --reset` again once you're finished testing to remove it.

@RodgeFu RodgeFu merged commit 63ffe68 into main Mar 19, 2024
9 checks passed
@RodgeFu RodgeFu deleted the openai-to-typespec-csharp-rename branch March 19, 2024 13:20
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.

[MPG][.Net] Pass along renaming information from .NET SDK generation to TypeSpec
2 participants