Patrick Stevens
2fc8ba958c
Add IAsyncDisposable support in mock generators ( #456 )
...
* Add IAsyncDisposable support to mock generators
Extend both GenerateMock and GenerateCapturingMock to support interfaces
that inherit IAsyncDisposable, mirroring the existing IDisposable pattern.
Changes:
- Add IAsyncDisposable to KnownInheritance type
- Detect IAsyncDisposable inheritance in interface parsing
- Generate DisposeAsync field with ValueTask return type
- Initialize DisposeAsync with completed ValueTask() in Empty mock
- Implement System.IAsyncDisposable interface explicitly
- Support interfaces inheriting both IDisposable and IAsyncDisposable
Test cases added:
- TypeWithAsyncDisposable: interface with only IAsyncDisposable
- TypeWithBothDisposables: interface with both disposal interfaces
🤖 Generated with [Claude Code](https://claude.com/claude-code )
2025-11-20 08:59:30 +00:00
Patrick Stevens
67e051b6b3
Add --no- prefix for bools ( #455 )
...
Implements support for --no- prefix negation on boolean and flag DU fields
when marked with [<ArgumentNegateWithPrefix>]. This allows both --flag and
--no-flag forms to be accepted, with --no- variants negating the value.
Changes:
- Extend ArgParserGenerator to generate --no- prefix handling
- Add conflict detection for overlapping --no- prefixed arguments
- Update help text to display both forms (e.g., --verbose / --no-verbose)
- Add test examples in ArgParserNegationTests.fs demonstrating:
- Boolean field negation
- Flag DU negation
- Multiple ArgumentLongForm with negation
- Combined features (defaults, help text)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-19 07:53:15 +00:00
Patrick Stevens
1721ad1ac0
Unconditional function for empty generating mock ( #430 )
2025-09-30 21:52:59 +00:00
Patrick Stevens
1b85182b9d
GenerateCapturingMock that captures calls made to it ( #425 )
2025-09-18 15:42:10 +01:00
Patrick Stevens
4fe4e3f277
Add JSON headers automatically to Body in HTTP client ( #395 )
2025-06-18 15:46:14 +00:00
Patrick Stevens
e8571553c4
Fix the incorrect rendering of the Patch attribute ( #375 )
2025-04-22 22:53:32 +01:00
Patrick Stevens
425d5313b4
Be compatible with <Nullable>enable</Nullable> ( #369 )
2025-04-21 18:43:52 +01:00
Patrick Stevens
0fe97da788
Have arg parser take string -> string option ( #368 )
2025-04-21 09:07:58 +00:00
Patrick Stevens
f944953384
Enforce non-nullability in more cases during JSON parse ( #367 )
2025-04-20 17:20:22 +00:00
Patrick Stevens
7930039ad1
Revert "Some fixes to nullability ( #365 )" ( #366 )
...
This reverts commit 8d275f0047 .
2025-04-20 17:02:40 +00:00
Patrick Stevens
8d275f0047
Some fixes to nullability ( #365 )
2025-04-20 16:26:45 +00:00
Patrick Stevens
277a186fda
Allow properties in mocked interfaces ( #336 )
2025-02-12 23:53:15 +00:00
dependabot[bot]
74fdd7c0a9
Bump fantomas from 6.3.16 to 7.0.0 ( #326 )
...
* Bump fantomas from 6.3.16 to 7.0.0
Bumps [fantomas](https://github.com/fsprojects/fantomas ) from 6.3.16 to 7.0.0.
- [Release notes](https://github.com/fsprojects/fantomas/releases )
- [Changelog](https://github.com/fsprojects/fantomas/blob/main/CHANGELOG.md )
- [Commits](https://github.com/fsprojects/fantomas/compare/v6.3.16...v7.0.0 )
---
updated-dependencies:
- dependency-name: fantomas
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
* Deps
* Format
---------
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Smaug123 <3138005+Smaug123@users.noreply.github.com >
2025-01-14 10:35:58 +00:00
Patrick Stevens
4136f7fe94
Update to net9 SDK ( #302 )
2024-12-15 22:13:30 +00:00
Patrick Stevens
16e6b91548
Use EscapeDataString instead of UrlEncode ( #278 )
2024-10-03 15:10:39 +00:00
Patrick Stevens
8488883835
Remove more of Myriad.Core ( #276 )
2024-10-02 20:38:00 +00:00
Patrick Stevens
0652744c57
Allow using fsproj annotations instead of attributes ( #275 )
2024-10-02 19:30:21 +00:00
Patrick Stevens
93a1b630c8
Add HTTP Swagger client generator ( #250 )
2024-09-19 17:21:09 +01:00
Patrick Stevens
4482038e8a
Support individual per-method headers ( #268 )
2024-09-19 17:08:38 +01:00
Patrick Stevens
0a1783d6ed
Support [<BasePath>] ( #263 )
2024-09-15 17:38:03 +00:00
Patrick Stevens
9a3ebbf28f
Cope with unit type in JSON ( #262 )
2024-09-15 14:37:50 +00:00
Patrick Stevens
e22525c200
Interpret JsonExtensionData ( #261 )
2024-09-15 11:13:22 +01:00
Patrick Stevens
693b95106a
Also pipe through parser in PositionalArgs true ( #259 )
2024-09-13 16:11:53 +00:00
Patrick Stevens
49ecfbf5e5
Fix includeFlagLike when arg doesn't have an equals ( #257 )
2024-09-12 22:10:08 +00:00
Patrick Stevens
5748ac3d5b
Allow consuming *all* args as positionals, not just ones which look like --foo ( #255 )
2024-09-11 19:00:04 +00:00
Patrick Stevens
913959a740
Make arg parser more AOT-friendly ( #253 )
2024-09-10 22:16:43 +01:00
Patrick Stevens
029e3746bb
Fix record/union impl accessibility ( #245 )
2024-09-07 08:49:28 +00:00
Patrick Stevens
8ae749c529
Add ArgumentLongForm ( #244 )
2024-09-05 21:26:52 +01:00
Patrick Stevens
e4cbab3209
Implement [<ArgumentFlag>] for two-case DUs ( #242 )
2024-09-04 21:48:36 +00:00
Patrick Stevens
bdce82fb7a
Handle env vars with value 0 and 1 for bools ( #241 )
2024-09-04 21:06:22 +01:00
Patrick Stevens
8f9f933971
Handle URI in arg parser ( #240 )
2024-09-04 20:20:51 +01:00
Patrick Stevens
3a55ba1242
Allow positional args to be Choice<'a, 'a> to indicate whether they came before any positional marker ( #238 )
2024-09-04 20:09:40 +01:00
Patrick Stevens
2220f88053
Compose records in arg parser ( #234 )
2024-09-03 23:04:23 +00:00
Patrick Stevens
417ca45c37
Basic arg parser ( #216 )
2024-08-26 11:54:35 +01:00
Patrick Stevens
569b3cc553
Pull out general changes from ArgParser PR ( #217 )
2024-08-25 19:23:23 +00:00
Patrick Stevens
398cd04a2a
Support DateTimeOffset in JSON generators ( #179 )
2024-07-01 18:08:09 +01:00
Patrick Stevens
434c042510
Omit upcasts where possible ( #178 )
2024-07-01 17:45:36 +01:00
Patrick Stevens
c590db2a65
JSON enums ( #175 )
2024-06-27 21:23:06 +01:00
Patrick Stevens
6a81513a93
Add nullable support to JSON generators ( #174 )
2024-06-27 08:40:58 +01:00
Patrick Stevens
ba31689145
Also allow serialising units of measure ( #171 )
2024-06-25 00:04:56 +01:00
Patrick Stevens
85929d49d5
Support units of measure in JsonParse ( #170 )
2024-06-24 23:23:23 +01:00
Patrick Stevens
4901e7cdf4
Add visibility modifiers in JsonParse/Serialize ( #165 )
2024-06-15 21:03:59 +01:00
Patrick Stevens
f371ee59fe
Say which mock function wasn't implemented ( #160 )
2024-06-04 18:36:49 +01:00
Patrick Stevens
adf497c5db
Tidy up a bit more ( #156 )
2024-06-01 15:57:53 +01:00
Patrick Stevens
7b14e52e9d
Use our DSLs a bit more ( #154 )
2024-05-31 19:20:28 +01:00
Patrick Stevens
8e47f39efc
Make more extensive use of our own DSLs ( #153 )
2024-05-31 16:54:05 +00:00
Patrick Stevens
b98080690d
Finish DU parsing ( #151 )
2024-05-30 22:27:15 +01:00
Patrick Stevens
81b7e5361d
Another grand refactor ( #150 )
2024-05-30 20:34:53 +01:00
Patrick Stevens
35cd94cba1
Add JSON serialisation of DUs ( #144 )
2024-05-30 12:00:55 +01:00
Patrick Stevens
4b9f63d374
Express HttpClient as extension method ( #140 )
2024-05-24 22:09:33 +01:00