Generate IDisposable Refit Interfaces #543
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The changes here fixes the issue introduced in #541 where the generated code using
IDisposable
doesn't build due to theSystem
namespace being imported multiple times.This pull request includes several updates to documentation, configuration files, and code to support new features and improve existing functionality. The most important changes include the addition of polymorphic serialization and disposable client generation, along with corresponding updates to documentation and tests.
New Features:
README.md
,cli-tool.md
,json-schema.json
,GenerateCommand.cs
) [1] [2] [3] [4]README.md
,cli-tool.md
,json-schema.json
,GenerateCommand.cs
) [1] [2] [3] [4]Documentation Updates:
README.md
files and other documentation to reflect the new options for polymorphic serialization and disposable client generation. (README.md
,cli-tool.md
,refitter-file-format.md
) [1] [2] [3].refitter
file format and CLI tool documentation. (refitter-file-format.md
,cli-tool.md
) [1] [2]Codebase Enhancements:
RefitInterfaceImports.cs
to conditionally include theSystem
namespace only if disposable clients are generated. (RefitInterfaceImports.cs
)GenerateCommand.cs
to include the newGenerateDisposableClients
setting. (GenerateCommand.cs
)Testing Improvements:
SwaggerPetstoreMultipleFileTests.cs
,SwaggerPetstoreTests.cs
) [1] [2]