Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ConsumePlugin/Args.fs
Original file line number Diff line number Diff line change
Expand Up @@ -235,3 +235,9 @@ type FlagsIntoPositionalArgs' =
[<PositionalArgs false>]
DontGrabEverything : string list
}

[<ArgParser true>]
type PassThru =
{
A : ParentRecordChildPos
}
35 changes: 35 additions & 0 deletions ConsumePlugin/ArgsWithUnions.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
namespace ConsumePlugin.ArgsWithUnions

open System
open System.IO
open WoofWare.Myriad.Plugins

type BasicNoPositionals =
{
Foo : int
Bar : string
Baz : bool
Rest : int list
}

type UsernamePasswordAuth =
{
Username : string
Password : string
}

type TokenAuth =
{
Token : string
}

type AuthOptions =
| UsernamePassword of UsernamePasswordAuth
| Token of TokenAuth

[<ArgParser>]
type DoTheThing =
{
Basics : BasicNoPositionals
Auth : AuthOptions
}
8 changes: 8 additions & 0 deletions ConsumePlugin/ConsumePlugin.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<ItemGroup>
<None Include="myriad.toml"/>
<Compile Include="AssemblyInfo.fs" />
<!--
<Compile Include="RecordFile.fs"/>
<Compile Include="GeneratedRecord.fs">
<MyriadFile>RecordFile.fs</MyriadFile>
Expand Down Expand Up @@ -66,10 +67,16 @@
<Compile Include="ListCata.fs">
<MyriadFile>List.fs</MyriadFile>
</Compile>
-->
<Compile Include="Args.fs" />
<Compile Include="GeneratedArgs.fs">
<MyriadFile>Args.fs</MyriadFile>
</Compile>
<Compile Include="ArgsWithUnions.fs" />
<Compile Include="GeneratedArgsWithUnions.fs">
<MyriadFile>ArgsWithUnions.fs</MyriadFile>
</Compile>
<!--
<None Include="swagger-gitea.json" />
<Compile Include="GeneratedSwaggerGitea.fs">
<MyriadFile>swagger-gitea.json</MyriadFile>
Expand All @@ -81,6 +88,7 @@
<Compile Include="Generated2SwaggerGitea.fs">
<MyriadFile>GeneratedSwaggerGitea.fs</MyriadFile>
</Compile>
-->
</ItemGroup>

<ItemGroup>
Expand Down
Loading
Loading