-
-
Notifications
You must be signed in to change notification settings - Fork 63
Add support for customizing the default Integer format #792
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
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
f5f894b
Introduce --integer-type CLI argument
christianhelle 0ca6570
Add IntegerType property to CodeGeneratorSettings
christianhelle bf52800
Enable IntegerType setting in GenerateCommand
christianhelle dc53d89
Add custom integer type processing in CSharpClientGeneratorFactory
christianhelle deeaf2b
Add tests for integer type generation with and without format
christianhelle cc253ea
Update README to document --integer-type option for OpenAPI integer t…
christianhelle a1a3b8e
Add `integerType` property to JSON Schema definition
christianhelle e0a61e6
Document usage of `--integer-type` CLI argument in NuGet README
christianhelle e3b29eb
Update MSBuild README
christianhelle 59c3b86
Update source generator README
christianhelle 0f373e1
Update refitter-file-format docfx article
christianhelle 8198259
Update cli tool docfx article
christianhelle 0f8685c
Rename test class to `IntegerFormatTests` for consistency
christianhelle 50662f3
Introduce `IntegerType` enum for OpenAPI integer type handling
christianhelle a4741d7
Add enum constraint to `integerType` in JSON Schema and update descri…
christianhelle 4d4957c
Update documentation to reflect `integerType` default as `Int32` and …
christianhelle 364fad4
Document `--integer-type` CLI argument in Copilot instructions
christianhelle cbcdbd8
Combine the collections into a single array/list before iteration to …
christianhelle 5feb7c1
Extend `IntegerFormatTests` to cover integer formats in request param…
christianhelle 2b3eac5
Extend `IntegerFormatTests` to include complex object and schema comb…
christianhelle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| namespace Refitter.Core; | ||
|
|
||
| /// <summary> | ||
| /// Specifies the .NET type to use for OpenAPI integer types | ||
| /// without a format specifier | ||
| /// </summary> | ||
| public enum IntegerType | ||
| { | ||
| /// <summary> | ||
| /// Use System.Int32 (int) for integers without format | ||
| /// </summary> | ||
| Int32, | ||
|
|
||
| /// <summary> | ||
| /// Use System.Int64 (long) for integers without format | ||
| /// </summary> | ||
| Int64 | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.