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

[Apizr] Generate Apizr formatted Refit interface without .refitter settings file #430

Merged
merged 3 commits into from
Jul 26, 2024

Conversation

JeremyBP
Copy link
Contributor

That was the missing part of the #404 puzzle.
Previous #428 PR focused on generating things from a .refitter settings file.

Now with that PR we can generate Apizr formatted Refit interfaces without settings file but with such a command line:

refitter https://petstore3.swagger.io/api/v3/openapi.yaml --use-apizr

It will generate the Refit interface, but formatted to Apizr by:

  • Adding a final IApizrRequestOptions options parameter to all generated methods
  • Providing cancellation tokens by Apizr request options instead of a dedicated parameter
  • Using method overloads instead of optional parameters

So now we should get best of both CLI & SourceGenerator worlds 🥂

Copy link

sonarcloud bot commented Jul 26, 2024

Copy link

codecov bot commented Jul 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.45%. Comparing base (6e1ab42) to head (688e58a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #430   +/-   ##
=======================================
  Coverage   95.45%   95.45%           
=======================================
  Files          70       70           
  Lines        3389     3389           
=======================================
  Hits         3235     3235           
  Misses        114      114           
  Partials       40       40           
Flag Coverage Δ
unittests 95.45% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@christianhelle christianhelle left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @JeremyBP

@christianhelle christianhelle merged commit ae4f268 into christianhelle:main Jul 26, 2024
423 checks passed
@christianhelle christianhelle self-assigned this Jul 26, 2024
@christianhelle christianhelle added the enhancement New feature, bug fix, or request label Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature, bug fix, or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants