-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Generate Multiple interfaces based on first Tag #95
Generate Multiple interfaces based on first Tag #95
Conversation
@kirides this is some very good stuff! I don't mind the breaking change since as far as I know, I'm the only one using |
@all-contributors please add @kirides for code |
I've put up a pull request to add @kirides! 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kirides The builds are failing because --multiple-interfaces
is now expecting an extra argument
Can I ask you to update line 60 in the file .github\workflows\template.yml
to
${{ inputs.command }} ./openapi.${{ inputs.format }} --namespace "$namespace.MultipleInterfaces" --output "MultipleInterfaces$outputPath" --multiple-interfaces ByEndpoint --no-logging
and line 116-119 in the file test\smoke-tests.ps1
to:
Write-Host "dotnet run --project ../src/Refitter/Refitter.csproj ./openapi.$format --namespace $namespace.MultipleInterfaces --output ./GeneratedCode/MultipleInterfaces$outputPath --multiple-interfaces ByEndpoint --no-logging"
$process = Start-Process "dotnet" `
-Args "run --project ../src/Refitter/Refitter.csproj ./openapi.$format --namespace $namespace.MultipleInterfaces --output ./GeneratedCode/MultipleInterfaces$outputPath --multiple-interfaces ByEndpoint --no-logging" `
-NoNewWindow `
-PassThru
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kirides if its not too much trouble, please update src\Refitter.SourceGenerator\README.md
so the example .refitter file and explanations match the proposed changes
Sure will do those things. |
@kirides thanks! Remember to enjoy the weekend first 😄 |
This PR adds an additional mode for
--multiple-interfaces
calledByTag
which uses the first Tag of the operation to generate the interface name.This PR also adds a
BREAKING
change as--multiple-interfaces
now takes in an enumeration ofUnset
,ByEndpoint
andByTag
.The source generator
.refitter
file has the same breaking change, as it now takes its value as string like this:Generated sample:
spec: