From 9ce061f065d4b242ca9ecf4f5bf061961d57a6f5 Mon Sep 17 00:00:00 2001
From: Smaug123 <3138005+Smaug123@users.noreply.github.com>
Date: Thu, 3 Oct 2024 15:59:27 +0100
Subject: [PATCH 1/4] Use Whippet
---
ConsumePlugin/ConsumePlugin.fsproj | 2 +-
ConsumePlugin/Generated2SwaggerGitea.fs | 1 -
ConsumePlugin/GeneratedArgs.fs | 1 -
ConsumePlugin/GeneratedCatamorphism.fs | 1 -
ConsumePlugin/GeneratedFileSystem.fs | 1 -
ConsumePlugin/GeneratedJson.fs | 1 -
ConsumePlugin/GeneratedMock.fs | 1 -
ConsumePlugin/GeneratedMockNoAttributes.fs | 1 -
ConsumePlugin/GeneratedPureGymDto.fs | 1 -
ConsumePlugin/GeneratedRecord.fs | 28 -----------
ConsumePlugin/GeneratedRestClient.fs | 1 -
ConsumePlugin/GeneratedSerde.fs | 1 -
ConsumePlugin/GeneratedSwaggerGitea.fs | 1 -
ConsumePlugin/GeneratedVault.fs | 1 -
ConsumePlugin/ListCata.fs | 1 -
WoofWare.Myriad.Plugins/AstHelper.fs | 17 +------
.../RemoveOptionsGenerator.fs | 49 ++++++++++++++++---
WoofWare.Myriad.Plugins/SynExpr/SynType.fs | 16 ++++++
.../WoofWare.Myriad.Plugins.fsproj | 2 +
WoofWare.Myriad.sln | 6 +++
20 files changed, 67 insertions(+), 66 deletions(-)
diff --git a/ConsumePlugin/ConsumePlugin.fsproj b/ConsumePlugin/ConsumePlugin.fsproj
index d509e3b..6026957 100644
--- a/ConsumePlugin/ConsumePlugin.fsproj
+++ b/ConsumePlugin/ConsumePlugin.fsproj
@@ -14,7 +14,7 @@
- RecordFile.fs
+ RecordFile.fs
diff --git a/ConsumePlugin/Generated2SwaggerGitea.fs b/ConsumePlugin/Generated2SwaggerGitea.fs
index 48126fd..c5f38cf 100644
--- a/ConsumePlugin/Generated2SwaggerGitea.fs
+++ b/ConsumePlugin/Generated2SwaggerGitea.fs
@@ -3,7 +3,6 @@
// Changes to this file will be lost when the code is regenerated.
//------------------------------------------------------------------------------
-
namespace Gitea
open WoofWare.Myriad.Plugins
diff --git a/ConsumePlugin/GeneratedArgs.fs b/ConsumePlugin/GeneratedArgs.fs
index 7a0752f..309fdc0 100644
--- a/ConsumePlugin/GeneratedArgs.fs
+++ b/ConsumePlugin/GeneratedArgs.fs
@@ -7,7 +7,6 @@
-
namespace ConsumePlugin
open System
diff --git a/ConsumePlugin/GeneratedCatamorphism.fs b/ConsumePlugin/GeneratedCatamorphism.fs
index 4d280ee..a3144eb 100644
--- a/ConsumePlugin/GeneratedCatamorphism.fs
+++ b/ConsumePlugin/GeneratedCatamorphism.fs
@@ -6,7 +6,6 @@
-
namespace ConsumePlugin
open WoofWare.Myriad.Plugins
diff --git a/ConsumePlugin/GeneratedFileSystem.fs b/ConsumePlugin/GeneratedFileSystem.fs
index 4a2fff9..d2d4dfa 100644
--- a/ConsumePlugin/GeneratedFileSystem.fs
+++ b/ConsumePlugin/GeneratedFileSystem.fs
@@ -6,7 +6,6 @@
-
namespace ConsumePlugin
open WoofWare.Myriad.Plugins
diff --git a/ConsumePlugin/GeneratedJson.fs b/ConsumePlugin/GeneratedJson.fs
index 956fb22..d1dd965 100644
--- a/ConsumePlugin/GeneratedJson.fs
+++ b/ConsumePlugin/GeneratedJson.fs
@@ -3,7 +3,6 @@
// Changes to this file will be lost when the code is regenerated.
//------------------------------------------------------------------------------
-
namespace ConsumePlugin
open System.Text.Json.Serialization
diff --git a/ConsumePlugin/GeneratedMock.fs b/ConsumePlugin/GeneratedMock.fs
index a1c02a3..bd68a1a 100644
--- a/ConsumePlugin/GeneratedMock.fs
+++ b/ConsumePlugin/GeneratedMock.fs
@@ -2,7 +2,6 @@
// This code was generated by myriad.
// Changes to this file will be lost when the code is regenerated.
//------------------------------------------------------------------------------
-
namespace SomeNamespace
open System
diff --git a/ConsumePlugin/GeneratedMockNoAttributes.fs b/ConsumePlugin/GeneratedMockNoAttributes.fs
index f9ea47c..443e714 100644
--- a/ConsumePlugin/GeneratedMockNoAttributes.fs
+++ b/ConsumePlugin/GeneratedMockNoAttributes.fs
@@ -2,7 +2,6 @@
// This code was generated by myriad.
// Changes to this file will be lost when the code is regenerated.
//------------------------------------------------------------------------------
-
namespace SomeNamespace
open System
diff --git a/ConsumePlugin/GeneratedPureGymDto.fs b/ConsumePlugin/GeneratedPureGymDto.fs
index 4930adb..c9b0c7c 100644
--- a/ConsumePlugin/GeneratedPureGymDto.fs
+++ b/ConsumePlugin/GeneratedPureGymDto.fs
@@ -3,7 +3,6 @@
// Changes to this file will be lost when the code is regenerated.
//------------------------------------------------------------------------------
-
namespace PureGym
open System
diff --git a/ConsumePlugin/GeneratedRecord.fs b/ConsumePlugin/GeneratedRecord.fs
index d979a10..e69de29 100644
--- a/ConsumePlugin/GeneratedRecord.fs
+++ b/ConsumePlugin/GeneratedRecord.fs
@@ -1,28 +0,0 @@
-//------------------------------------------------------------------------------
-// This code was generated by myriad.
-// Changes to this file will be lost when the code is regenerated.
-//------------------------------------------------------------------------------
-namespace ConsumePlugin
-
-/// Module containing an option-truncated version of the RecordType type
-[]
-[]
-module RecordType =
- /// My whatnot
- type Short =
- {
- /// A thing!
- A : int
- /// Another thing!
- B : string
- /// Yet another thing!
- C : float list
- }
-
- /// Remove the optional members of the input.
- let shorten (input : RecordType) : Short =
- {
- A = input.A |> Option.defaultWith RecordType.DefaultA
- B = input.B
- C = input.C
- }
diff --git a/ConsumePlugin/GeneratedRestClient.fs b/ConsumePlugin/GeneratedRestClient.fs
index d4adb02..fbbd0ec 100644
--- a/ConsumePlugin/GeneratedRestClient.fs
+++ b/ConsumePlugin/GeneratedRestClient.fs
@@ -5,7 +5,6 @@
-
namespace PureGym
open System
diff --git a/ConsumePlugin/GeneratedSerde.fs b/ConsumePlugin/GeneratedSerde.fs
index 7a1d8c5..7febc5c 100644
--- a/ConsumePlugin/GeneratedSerde.fs
+++ b/ConsumePlugin/GeneratedSerde.fs
@@ -3,7 +3,6 @@
// Changes to this file will be lost when the code is regenerated.
//------------------------------------------------------------------------------
-
namespace ConsumePlugin
open System
diff --git a/ConsumePlugin/GeneratedSwaggerGitea.fs b/ConsumePlugin/GeneratedSwaggerGitea.fs
index 2f2d0b1..7937cd6 100644
--- a/ConsumePlugin/GeneratedSwaggerGitea.fs
+++ b/ConsumePlugin/GeneratedSwaggerGitea.fs
@@ -8,7 +8,6 @@
-
namespace Gitea
open WoofWare.Myriad.Plugins
diff --git a/ConsumePlugin/GeneratedVault.fs b/ConsumePlugin/GeneratedVault.fs
index eb0e69d..e89dc74 100644
--- a/ConsumePlugin/GeneratedVault.fs
+++ b/ConsumePlugin/GeneratedVault.fs
@@ -4,7 +4,6 @@
//------------------------------------------------------------------------------
-
namespace ConsumePlugin
/// Module containing JSON parsing methods for the JwtVaultAuthResponse type
diff --git a/ConsumePlugin/ListCata.fs b/ConsumePlugin/ListCata.fs
index a6e3e84..9c2d250 100644
--- a/ConsumePlugin/ListCata.fs
+++ b/ConsumePlugin/ListCata.fs
@@ -6,7 +6,6 @@
-
namespace ConsumePlugin
open WoofWare.Myriad.Plugins
diff --git a/WoofWare.Myriad.Plugins/AstHelper.fs b/WoofWare.Myriad.Plugins/AstHelper.fs
index d82a23b..94da94d 100644
--- a/WoofWare.Myriad.Plugins/AstHelper.fs
+++ b/WoofWare.Myriad.Plugins/AstHelper.fs
@@ -294,21 +294,6 @@ module internal AstHelper =
}
| _ -> failwithf "Didn't have alternating type-and-star in interface member definition: %+A" tupleType
- /// Returns the args (where these are tuple types if curried) in order, and the return type.
- let rec getType (ty : SynType) : (SynType * bool) list * SynType =
- match ty with
- | SynType.Paren (ty, _) -> getType ty
- | SynType.Fun (argType, returnType, _, _) ->
- let args, ret = getType returnType
- // TODO this code is clearly wrong
- let (inputArgs, inputRet), hasParen =
- match argType with
- | SynType.Paren (argType, _) -> getType argType, true
- | _ -> getType argType, false
-
- ((SynType.toFun (List.map fst inputArgs) inputRet), hasParen) :: args, ret
- | _ -> [], ty
-
let private parseMember (slotSig : SynValSig) (flags : SynMemberFlags) : Choice =
if not flags.IsInstance then
failwith "member was not an instance member"
@@ -341,7 +326,7 @@ module internal AstHelper =
let attrs = attrs |> List.collect _.Attributes
- let args, ret = getType synType
+ let args, ret = SynType.getType synType
let args =
args
diff --git a/WoofWare.Myriad.Plugins/RemoveOptionsGenerator.fs b/WoofWare.Myriad.Plugins/RemoveOptionsGenerator.fs
index 94d8f94..cfa80ea 100644
--- a/WoofWare.Myriad.Plugins/RemoveOptionsGenerator.fs
+++ b/WoofWare.Myriad.Plugins/RemoveOptionsGenerator.fs
@@ -1,6 +1,9 @@
namespace WoofWare.Myriad.Plugins
+open System
+open System.Text
open Fantomas.FCS.Syntax
+open Fantomas.FCS.SyntaxTrivia
open Fantomas.FCS.Xml
[]
@@ -131,21 +134,26 @@ module internal RemoveOptionsGenerator =
|> List.singleton
|> SynModuleOrNamespace.createNamespace namespaceId
-open Myriad.Core
+open WoofWare.Whippet.Core
/// Myriad generator that stamps out a record with option types stripped
/// from the fields at the top level.
-[]
+[]
type RemoveOptionsGenerator () =
- interface IMyriadGenerator with
- member _.ValidInputExtensions = [ ".fs" ]
+ interface IGenerateRawFromRaw with
+
+ member _.GenerateRawFromRaw (args : RawSourceGenerationArgs) : string =
+ if not (args.FilePath.EndsWith (".fs", StringComparison.OrdinalIgnoreCase)) then
+ null
+ else
- member _.Generate (context : GeneratorContext) =
let ast, _ =
- Ast.fromFilename context.InputFilename |> Async.RunSynchronously |> Array.head
+ Fantomas.Core.CodeFormatter.ParseAsync (false, Encoding.UTF8.GetString args.FileContents)
+ |> Async.RunSynchronously
+ |> Array.head
- let records = Ast.extractRecords ast
+ let records = Myriad.Core.Ast.extractRecords ast
let namespaceAndRecords =
records
@@ -185,4 +193,29 @@ type RemoveOptionsGenerator () =
)
)
- Output.Ast modules
+ if modules.IsEmpty then
+ null
+ else
+
+ let parseTree =
+ ParsedInput.ImplFile (
+ ParsedImplFileInput.ParsedImplFileInput (
+ "file.fs",
+ false,
+ QualifiedNameOfFile.QualifiedNameOfFile (Ident.create "file"),
+ [],
+ [],
+ modules,
+ (false, false),
+ {
+ ParsedImplFileInputTrivia.CodeComments = []
+ ConditionalDirectives = []
+ },
+ Set.empty
+ )
+ )
+
+ let cfg = Fantomas.Core.FormatConfig.Default
+
+ Fantomas.Core.CodeFormatter.FormatASTAsync (parseTree, cfg)
+ |> Async.RunSynchronously
diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynType.fs b/WoofWare.Myriad.Plugins/SynExpr/SynType.fs
index 3fb417d..47f00db 100644
--- a/WoofWare.Myriad.Plugins/SynExpr/SynType.fs
+++ b/WoofWare.Myriad.Plugins/SynExpr/SynType.fs
@@ -285,6 +285,7 @@ module internal SynTypePatterns =
[]
module internal SynType =
+
let rec stripOptionalParen (ty : SynType) : SynType =
match ty with
| SynType.Paren (ty, _) -> stripOptionalParen ty
@@ -537,3 +538,18 @@ module internal SynType =
let ident2 = ident2 |> List.map _.idText
ident1 = ident2
| _, _ -> false
+
+ /// Returns the args (where these are tuple types if curried) in order, and the return type.
+ let rec getType (ty : SynType) : (SynType * bool) list * SynType =
+ match ty with
+ | SynType.Paren (ty, _) -> getType ty
+ | SynType.Fun (argType, returnType, _, _) ->
+ let args, ret = getType returnType
+ // TODO this code is clearly wrong
+ let (inputArgs, inputRet), hasParen =
+ match argType with
+ | SynType.Paren (argType, _) -> getType argType, true
+ | _ -> getType argType, false
+
+ ((toFun (List.map fst inputArgs) inputRet), hasParen) :: args, ret
+ | _ -> [], ty
diff --git a/WoofWare.Myriad.Plugins/WoofWare.Myriad.Plugins.fsproj b/WoofWare.Myriad.Plugins/WoofWare.Myriad.Plugins.fsproj
index 1f04d67..cdeb938 100644
--- a/WoofWare.Myriad.Plugins/WoofWare.Myriad.Plugins.fsproj
+++ b/WoofWare.Myriad.Plugins/WoofWare.Myriad.Plugins.fsproj
@@ -18,6 +18,7 @@
+
@@ -81,6 +82,7 @@
+
diff --git a/WoofWare.Myriad.sln b/WoofWare.Myriad.sln
index 61d3d2b..296ec81 100644
--- a/WoofWare.Myriad.sln
+++ b/WoofWare.Myriad.sln
@@ -10,6 +10,8 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "WoofWare.Myriad.Plugins.Att
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "WoofWare.Myriad.Plugins.Attributes.Test", "WoofWare.Myriad.Plugins.Attributes\Test\WoofWare.Myriad.Plugins.Attributes.Test.fsproj", "{26DC0C94-85F2-45B4-8FA1-1B27201F7AFB}"
EndProject
+Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "WoofWare.Whippet.Core", "..\WoofWare.Whippet\WoofWare.Whippet.Core\WoofWare.Whippet.Core.fsproj", "{0831FDF4-9BCB-4595-8432-E90111AB98A2}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -36,5 +38,9 @@ Global
{26DC0C94-85F2-45B4-8FA1-1B27201F7AFB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{26DC0C94-85F2-45B4-8FA1-1B27201F7AFB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{26DC0C94-85F2-45B4-8FA1-1B27201F7AFB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0831FDF4-9BCB-4595-8432-E90111AB98A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0831FDF4-9BCB-4595-8432-E90111AB98A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0831FDF4-9BCB-4595-8432-E90111AB98A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0831FDF4-9BCB-4595-8432-E90111AB98A2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
From 98aa0305685dbcc01267427cfbb31143113bb5e7 Mon Sep 17 00:00:00 2001
From: Smaug123 <3138005+Smaug123@users.noreply.github.com>
Date: Sun, 6 Oct 2024 20:49:45 +0100
Subject: [PATCH 2/4] WIP
---
ConsumePlugin/ConsumePlugin.fsproj | 60 +-
ConsumePlugin/Generated2SwaggerGitea.fs | 24893 ++++++++--------
ConsumePlugin/GeneratedArgs.fs | 1690 +-
ConsumePlugin/GeneratedCatamorphism.fs | 189 +-
ConsumePlugin/GeneratedFileSystem.fs | 256 +-
ConsumePlugin/GeneratedJson.fs | 234 +-
ConsumePlugin/GeneratedMock.fs | 172 +-
ConsumePlugin/GeneratedMockNoAttributes.fs | 172 +-
ConsumePlugin/GeneratedPureGymDto.fs | 527 +-
ConsumePlugin/GeneratedRecord.fs | 24 +
ConsumePlugin/GeneratedRestClient.fs | 901 +-
ConsumePlugin/GeneratedSerde.fs | 508 +-
ConsumePlugin/GeneratedSwaggerGitea.fs | 8480 +++---
ConsumePlugin/GeneratedVault.fs | 390 +-
ConsumePlugin/ListCata.fs | 127 +-
NuGet.Config | 17 +
.../WoofWare.Myriad.Plugins.Test.fsproj | 1 +
WoofWare.Myriad.Plugins/ArgParserGenerator.fs | 24 +-
WoofWare.Myriad.Plugins/AstHelper.fs | 417 -
WoofWare.Myriad.Plugins/CataGenerator.fs | 45 +-
.../HttpClientGenerator.fs | 31 +-
.../InterfaceMockGenerator.fs | 30 +-
WoofWare.Myriad.Plugins/JsonParseGenerator.fs | 36 +-
.../JsonSerializeGenerator.fs | 36 +-
WoofWare.Myriad.Plugins/Measure.fs | 1 +
WoofWare.Myriad.Plugins/MyriadParamParser.fs | 64 -
WoofWare.Myriad.Plugins/Parameters.fs | 23 +
WoofWare.Myriad.Plugins/Primitives.fs | 32 -
.../RemoveOptionsGenerator.fs | 88 +-
.../SwaggerClientGenerator.fs | 34 +-
WoofWare.Myriad.Plugins/SynExpr/CompExpr.fs | 49 -
WoofWare.Myriad.Plugins/SynExpr/Ident.fs | 65 -
WoofWare.Myriad.Plugins/SynExpr/PreXmlDoc.fs | 17 -
WoofWare.Myriad.Plugins/SynExpr/SynArgInfo.fs | 7 -
WoofWare.Myriad.Plugins/SynExpr/SynArgPats.fs | 30 -
.../SynExpr/SynAttribute.fs | 27 -
.../SynExpr/SynAttributes.fs | 15 -
WoofWare.Myriad.Plugins/SynExpr/SynBinding.fs | 233 -
.../SynExpr/SynComponentInfo.fs | 50 -
WoofWare.Myriad.Plugins/SynExpr/SynConst.fs | 10 -
WoofWare.Myriad.Plugins/SynExpr/SynExpr.fs | 365 -
.../SynExpr/SynExprLetOrUseTrivia.fs | 10 -
WoofWare.Myriad.Plugins/SynExpr/SynField.fs | 76 -
WoofWare.Myriad.Plugins/SynExpr/SynIdent.fs | 10 -
.../SynExpr/SynLongIdent.fs | 140 -
.../SynExpr/SynMatchClause.fs | 24 -
.../SynExpr/SynMemberDefn.fs | 71 -
.../SynExpr/SynModuleDecl.fs | 30 -
.../SynExpr/SynModuleOrNamespace.fs | 24 -
WoofWare.Myriad.Plugins/SynExpr/SynPat.fs | 54 -
.../SynExpr/SynSimplePat.fs | 10 -
.../SynExpr/SynSimplePats.fs | 12 -
WoofWare.Myriad.Plugins/SynExpr/SynType.fs | 555 -
.../SynExpr/SynTypeDefn.fs | 46 -
.../SynExpr/SynTypeDefnRepr.fs | 24 -
.../SynExpr/SynUnionCase.fs | 55 -
WoofWare.Myriad.Plugins/SynExpr/SynValInfo.fs | 7 -
.../WoofWare.Myriad.Plugins.fsproj | 35 +-
WoofWare.Myriad.sln | 6 +
59 files changed, 18665 insertions(+), 22894 deletions(-)
create mode 100644 NuGet.Config
delete mode 100644 WoofWare.Myriad.Plugins/MyriadParamParser.fs
create mode 100644 WoofWare.Myriad.Plugins/Parameters.fs
delete mode 100644 WoofWare.Myriad.Plugins/Primitives.fs
delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/CompExpr.fs
delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/Ident.fs
delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/PreXmlDoc.fs
delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynArgInfo.fs
delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynArgPats.fs
delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynAttribute.fs
delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynAttributes.fs
delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynBinding.fs
delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynComponentInfo.fs
delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynConst.fs
delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynExpr.fs
delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynExprLetOrUseTrivia.fs
delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynField.fs
delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynIdent.fs
delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynLongIdent.fs
delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynMatchClause.fs
delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynMemberDefn.fs
delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynModuleDecl.fs
delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynModuleOrNamespace.fs
delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynPat.fs
delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynSimplePat.fs
delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynSimplePats.fs
delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynType.fs
delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynTypeDefn.fs
delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynTypeDefnRepr.fs
delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynUnionCase.fs
delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynValInfo.fs
diff --git a/ConsumePlugin/ConsumePlugin.fsproj b/ConsumePlugin/ConsumePlugin.fsproj
index 6026957..7c79079 100644
--- a/ConsumePlugin/ConsumePlugin.fsproj
+++ b/ConsumePlugin/ConsumePlugin.fsproj
@@ -6,11 +6,6 @@
--reflectionfree $(OtherFlags)
-
-
-
-
-
@@ -18,76 +13,73 @@
- JsonRecord.fs
+ JsonRecord.fs
- PureGymDto.fs
+ PureGymDto.fs
- RestApiExample.fs
+ RestApiExample.fs
- MockExample.fs
+ MockExample.fs
- MockExampleNoAttributes.fs
-
- GenerateMock
- GenerateMock(false)
- GenerateMock
- GenerateMock
- GenerateMock(false)
- GenerateMock
- GenerateMock
- GenerateMock
-
+ MockExampleNoAttributes.fs
+ GenerateMock
+ GenerateMock
+ GenerateMock(false)
+ GenerateMock
+ GenerateMock
+ GenerateMock(false)
+ GenerateMock
+ GenerateMock
+ GenerateMock
- Vault.fs
+ Vault.fs
- SerializationAndDeserialization.fs
+ SerializationAndDeserialization.fs
- Catamorphism.fs
+ Catamorphism.fs
- FSharpForFunAndProfitCata.fs
+ FSharpForFunAndProfitCata.fs
- List.fs
+ List.fs
- Args.fs
+ Args.fs
- swagger-gitea.json
-
- true
- Gitea
-
+ swagger-gitea.json
+ true
+ Gitea
- GeneratedSwaggerGitea.fs
+ GeneratedSwaggerGitea.fs
-
-
+
+
diff --git a/ConsumePlugin/Generated2SwaggerGitea.fs b/ConsumePlugin/Generated2SwaggerGitea.fs
index bd51fda..fc922de 100644
--- a/ConsumePlugin/Generated2SwaggerGitea.fs
+++ b/ConsumePlugin/Generated2SwaggerGitea.fs
@@ -1,8 +1,4 @@
-//------------------------------------------------------------------------------
-// This code was generated by myriad.
-// Changes to this file will be lost when the code is regenerated.
-//------------------------------------------------------------------------------
-
+// Source generated by Whippet. Changes will be overwritten on next build.
namespace Gitea
open WoofWare.Myriad.Plugins
@@ -14,33 +10,31 @@ module APIErrorJsonSerializeExtension =
type APIError with
/// Serialize to a JSON node
- static member toJsonNode (input : APIError) : System.Text.Json.Nodes.JsonNode =
- let node = System.Text.Json.Nodes.JsonObject ()
+ static member toJsonNode(input: APIError) : System.Text.Json.Nodes.JsonNode =
+ let node = System.Text.Json.Nodes.JsonObject()
do
- for KeyValue (key, value) in input.AdditionalProperties do
- node.Add (key, id value)
+ for KeyValue(key, value) in input.AdditionalProperties do
+ node.Add(key, id value)
- node.Add (
+ node.Add(
"message",
(input.Message
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"url",
(input.Url
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
node :> _
@@ -55,36 +49,34 @@ module AccessTokenJsonSerializeExtension =
type AccessToken with
/// Serialize to a JSON node
- static member toJsonNode (input : AccessToken) : System.Text.Json.Nodes.JsonNode =
- let node = System.Text.Json.Nodes.JsonObject ()
+ static member toJsonNode(input: AccessToken) : System.Text.Json.Nodes.JsonNode =
+ let node = System.Text.Json.Nodes.JsonObject()
do
- for KeyValue (key, value) in input.AdditionalProperties do
- node.Add (key, id value)
+ for KeyValue(key, value) in input.AdditionalProperties do
+ node.Add(key, id value)
- node.Add (
+ node.Add(
"id",
(input.Id
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"name",
(input.Name
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"scopes",
(input.Scopes
|> (fun field ->
@@ -92,38 +84,34 @@ module AccessTokenJsonSerializeExtension =
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
((fun field ->
- let arr = System.Text.Json.Nodes.JsonArray ()
+ let arr = System.Text.Json.Nodes.JsonArray()
for mem in field do
- arr.Add (System.Text.Json.Nodes.JsonValue.Create mem)
+ arr.Add(System.Text.Json.Nodes.JsonValue.Create mem)
- arr
- )
+ arr)
field)
- :> System.Text.Json.Nodes.JsonNode
- ))
+ :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"sha1",
(input.Sha1
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"token_last_eight",
(input.TokenLastEight
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
node :> _
@@ -138,22 +126,21 @@ module ActivityPubJsonSerializeExtension =
type ActivityPub with
/// Serialize to a JSON node
- static member toJsonNode (input : ActivityPub) : System.Text.Json.Nodes.JsonNode =
- let node = System.Text.Json.Nodes.JsonObject ()
+ static member toJsonNode(input: ActivityPub) : System.Text.Json.Nodes.JsonNode =
+ let node = System.Text.Json.Nodes.JsonObject()
do
- for KeyValue (key, value) in input.AdditionalProperties do
- node.Add (key, id value)
+ for KeyValue(key, value) in input.AdditionalProperties do
+ node.Add(key, id value)
- node.Add (
+ node.Add(
"@context",
(input.Context
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
node :> _
@@ -168,22 +155,21 @@ module AddCollaboratorOptionJsonSerializeExtension =
type AddCollaboratorOption with
/// Serialize to a JSON node
- static member toJsonNode (input : AddCollaboratorOption) : System.Text.Json.Nodes.JsonNode =
- let node = System.Text.Json.Nodes.JsonObject ()
+ static member toJsonNode(input: AddCollaboratorOption) : System.Text.Json.Nodes.JsonNode =
+ let node = System.Text.Json.Nodes.JsonObject()
do
- for KeyValue (key, value) in input.AdditionalProperties do
- node.Add (key, id value)
+ for KeyValue(key, value) in input.AdditionalProperties do
+ node.Add(key, id value)
- node.Add (
+ node.Add(
"permission",
(input.Permission
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
node :> _
@@ -198,35 +184,33 @@ module AddTimeOptionJsonSerializeExtension =
type AddTimeOption with
/// Serialize to a JSON node
- static member toJsonNode (input : AddTimeOption) : System.Text.Json.Nodes.JsonNode =
- let node = System.Text.Json.Nodes.JsonObject ()
+ static member toJsonNode(input: AddTimeOption) : System.Text.Json.Nodes.JsonNode =
+ let node = System.Text.Json.Nodes.JsonObject()
do
- for KeyValue (key, value) in input.AdditionalProperties do
- node.Add (key, id value)
+ for KeyValue(key, value) in input.AdditionalProperties do
+ node.Add(key, id value)
- node.Add (
+ node.Add(
"created",
(input.Created
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add ("time", (input.Time |> System.Text.Json.Nodes.JsonValue.Create))
+ node.Add("time", (input.Time |> System.Text.Json.Nodes.JsonValue.Create))
- node.Add (
+ node.Add(
"user_name",
(input.UserName
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
node :> _
@@ -241,44 +225,41 @@ module AnnotatedTagObjectJsonSerializeExtension =
type AnnotatedTagObject with
/// Serialize to a JSON node
- static member toJsonNode (input : AnnotatedTagObject) : System.Text.Json.Nodes.JsonNode =
- let node = System.Text.Json.Nodes.JsonObject ()
+ static member toJsonNode(input: AnnotatedTagObject) : System.Text.Json.Nodes.JsonNode =
+ let node = System.Text.Json.Nodes.JsonObject()
do
- for KeyValue (key, value) in input.AdditionalProperties do
- node.Add (key, id value)
+ for KeyValue(key, value) in input.AdditionalProperties do
+ node.Add(key, id value)
- node.Add (
+ node.Add(
"sha",
(input.Sha
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"type",
(input.Type
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"url",
(input.Url
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
node :> _
@@ -293,88 +274,81 @@ module AttachmentJsonSerializeExtension =
type Attachment with
/// Serialize to a JSON node
- static member toJsonNode (input : Attachment) : System.Text.Json.Nodes.JsonNode =
- let node = System.Text.Json.Nodes.JsonObject ()
+ static member toJsonNode(input: Attachment) : System.Text.Json.Nodes.JsonNode =
+ let node = System.Text.Json.Nodes.JsonObject()
do
- for KeyValue (key, value) in input.AdditionalProperties do
- node.Add (key, id value)
+ for KeyValue(key, value) in input.AdditionalProperties do
+ node.Add(key, id value)
- node.Add (
+ node.Add(
"browser_download_url",
(input.BrowserDownloadUrl
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"created_at",
(input.CreatedAt
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"download_count",
(input.DownloadCount
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"id",
(input.Id
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"name",
(input.Name
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"size",
(input.Size
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"uuid",
(input.Uuid
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
node :> _
@@ -389,14 +363,14 @@ module BranchProtectionJsonSerializeExtension =
type BranchProtection with
/// Serialize to a JSON node
- static member toJsonNode (input : BranchProtection) : System.Text.Json.Nodes.JsonNode =
- let node = System.Text.Json.Nodes.JsonObject ()
+ static member toJsonNode(input: BranchProtection) : System.Text.Json.Nodes.JsonNode =
+ let node = System.Text.Json.Nodes.JsonObject()
do
- for KeyValue (key, value) in input.AdditionalProperties do
- node.Add (key, id value)
+ for KeyValue(key, value) in input.AdditionalProperties do
+ node.Add(key, id value)
- node.Add (
+ node.Add(
"approvals_whitelist_teams",
(input.ApprovalsWhitelistTeams
|> (fun field ->
@@ -404,19 +378,17 @@ module BranchProtectionJsonSerializeExtension =
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
((fun field ->
- let arr = System.Text.Json.Nodes.JsonArray ()
+ let arr = System.Text.Json.Nodes.JsonArray()
for mem in field do
- arr.Add (System.Text.Json.Nodes.JsonValue.Create mem)
+ arr.Add(System.Text.Json.Nodes.JsonValue.Create mem)
- arr
- )
+ arr)
field)
- :> System.Text.Json.Nodes.JsonNode
- ))
+ :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"approvals_whitelist_username",
(input.ApprovalsWhitelistUsername
|> (fun field ->
@@ -424,140 +396,127 @@ module BranchProtectionJsonSerializeExtension =
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
((fun field ->
- let arr = System.Text.Json.Nodes.JsonArray ()
+ let arr = System.Text.Json.Nodes.JsonArray()
for mem in field do
- arr.Add (System.Text.Json.Nodes.JsonValue.Create mem)
+ arr.Add(System.Text.Json.Nodes.JsonValue.Create mem)
- arr
- )
+ arr)
field)
- :> System.Text.Json.Nodes.JsonNode
- ))
+ :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"block_on_official_review_requests",
(input.BlockOnOfficialReviewRequests
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"block_on_outdated_branch",
(input.BlockOnOutdatedBranch
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"block_on_rejected_reviews",
(input.BlockOnRejectedReviews
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"branch_name",
(input.BranchName
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"created_at",
(input.CreatedAt
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"dismiss_stale_approvals",
(input.DismissStaleApprovals
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"enable_approvals_whitelist",
(input.EnableApprovalsWhitelist
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"enable_merge_whitelist",
(input.EnableMergeWhitelist
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"enable_push",
(input.EnablePush
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"enable_push_whitelist",
(input.EnablePushWhitelist
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"enable_status_check",
(input.EnableStatusCheck
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"merge_whitelist_teams",
(input.MergeWhitelistTeams
|> (fun field ->
@@ -565,19 +524,17 @@ module BranchProtectionJsonSerializeExtension =
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
((fun field ->
- let arr = System.Text.Json.Nodes.JsonArray ()
+ let arr = System.Text.Json.Nodes.JsonArray()
for mem in field do
- arr.Add (System.Text.Json.Nodes.JsonValue.Create mem)
+ arr.Add(System.Text.Json.Nodes.JsonValue.Create mem)
- arr
- )
+ arr)
field)
- :> System.Text.Json.Nodes.JsonNode
- ))
+ :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"merge_whitelist_usernames",
(input.MergeWhitelistUsernames
|> (fun field ->
@@ -585,41 +542,37 @@ module BranchProtectionJsonSerializeExtension =
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
((fun field ->
- let arr = System.Text.Json.Nodes.JsonArray ()
+ let arr = System.Text.Json.Nodes.JsonArray()
for mem in field do
- arr.Add (System.Text.Json.Nodes.JsonValue.Create mem)
+ arr.Add(System.Text.Json.Nodes.JsonValue.Create mem)
- arr
- )
+ arr)
field)
- :> System.Text.Json.Nodes.JsonNode
- ))
+ :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"protected_file_patterns",
(input.ProtectedFilePatterns
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"push_whitelist_deploy_keys",
(input.PushWhitelistDeployKeys
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"push_whitelist_teams",
(input.PushWhitelistTeams
|> (fun field ->
@@ -627,19 +580,17 @@ module BranchProtectionJsonSerializeExtension =
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
((fun field ->
- let arr = System.Text.Json.Nodes.JsonArray ()
+ let arr = System.Text.Json.Nodes.JsonArray()
for mem in field do
- arr.Add (System.Text.Json.Nodes.JsonValue.Create mem)
+ arr.Add(System.Text.Json.Nodes.JsonValue.Create mem)
- arr
- )
+ arr)
field)
- :> System.Text.Json.Nodes.JsonNode
- ))
+ :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"push_whitelist_usernames",
(input.PushWhitelistUsernames
|> (fun field ->
@@ -647,52 +598,47 @@ module BranchProtectionJsonSerializeExtension =
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
((fun field ->
- let arr = System.Text.Json.Nodes.JsonArray ()
+ let arr = System.Text.Json.Nodes.JsonArray()
for mem in field do
- arr.Add (System.Text.Json.Nodes.JsonValue.Create mem)
+ arr.Add(System.Text.Json.Nodes.JsonValue.Create mem)
- arr
- )
+ arr)
field)
- :> System.Text.Json.Nodes.JsonNode
- ))
+ :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"require_signed_commits",
(input.RequireSignedCommits
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"required_approvals",
(input.RequiredApprovals
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"rule_name",
(input.RuleName
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"status_check_contexts",
(input.StatusCheckContexts
|> (fun field ->
@@ -700,38 +646,34 @@ module BranchProtectionJsonSerializeExtension =
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
((fun field ->
- let arr = System.Text.Json.Nodes.JsonArray ()
+ let arr = System.Text.Json.Nodes.JsonArray()
for mem in field do
- arr.Add (System.Text.Json.Nodes.JsonValue.Create mem)
+ arr.Add(System.Text.Json.Nodes.JsonValue.Create mem)
- arr
- )
+ arr)
field)
- :> System.Text.Json.Nodes.JsonNode
- ))
+ :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"unprotected_file_patterns",
(input.UnprotectedFilePatterns
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"updated_at",
(input.UpdatedAt
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
node :> _
@@ -746,110 +688,101 @@ module ChangedFileJsonSerializeExtension =
type ChangedFile with
/// Serialize to a JSON node
- static member toJsonNode (input : ChangedFile) : System.Text.Json.Nodes.JsonNode =
- let node = System.Text.Json.Nodes.JsonObject ()
+ static member toJsonNode(input: ChangedFile) : System.Text.Json.Nodes.JsonNode =
+ let node = System.Text.Json.Nodes.JsonObject()
do
- for KeyValue (key, value) in input.AdditionalProperties do
- node.Add (key, id value)
+ for KeyValue(key, value) in input.AdditionalProperties do
+ node.Add(key, id value)
- node.Add (
+ node.Add(
"additions",
(input.Additions
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"changes",
(input.Changes
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"contents_url",
(input.ContentsUrl
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"deletions",
(input.Deletions
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"filename",
(input.Filename
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"html_url",
(input.HtmlUrl
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"previous_filename",
(input.PreviousFilename
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"raw_url",
(input.RawUrl
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"status",
(input.Status
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
node :> _
@@ -864,22 +797,21 @@ module CommitAffectedFilesJsonSerializeExtension =
type CommitAffectedFiles with
/// Serialize to a JSON node
- static member toJsonNode (input : CommitAffectedFiles) : System.Text.Json.Nodes.JsonNode =
- let node = System.Text.Json.Nodes.JsonObject ()
+ static member toJsonNode(input: CommitAffectedFiles) : System.Text.Json.Nodes.JsonNode =
+ let node = System.Text.Json.Nodes.JsonObject()
do
- for KeyValue (key, value) in input.AdditionalProperties do
- node.Add (key, id value)
+ for KeyValue(key, value) in input.AdditionalProperties do
+ node.Add(key, id value)
- node.Add (
+ node.Add(
"filename",
(input.Filename
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
node :> _
@@ -894,33 +826,31 @@ module CommitDateOptionsJsonSerializeExtension =
type CommitDateOptions with
/// Serialize to a JSON node
- static member toJsonNode (input : CommitDateOptions) : System.Text.Json.Nodes.JsonNode =
- let node = System.Text.Json.Nodes.JsonObject ()
+ static member toJsonNode(input: CommitDateOptions) : System.Text.Json.Nodes.JsonNode =
+ let node = System.Text.Json.Nodes.JsonObject()
do
- for KeyValue (key, value) in input.AdditionalProperties do
- node.Add (key, id value)
+ for KeyValue(key, value) in input.AdditionalProperties do
+ node.Add(key, id value)
- node.Add (
+ node.Add(
"author",
(input.Author
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"committer",
(input.Committer
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
node :> _
@@ -935,44 +865,41 @@ module CommitMetaJsonSerializeExtension =
type CommitMeta with
/// Serialize to a JSON node
- static member toJsonNode (input : CommitMeta) : System.Text.Json.Nodes.JsonNode =
- let node = System.Text.Json.Nodes.JsonObject ()
+ static member toJsonNode(input: CommitMeta) : System.Text.Json.Nodes.JsonNode =
+ let node = System.Text.Json.Nodes.JsonObject()
do
- for KeyValue (key, value) in input.AdditionalProperties do
- node.Add (key, id value)
+ for KeyValue(key, value) in input.AdditionalProperties do
+ node.Add(key, id value)
- node.Add (
+ node.Add(
"created",
(input.Created
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"sha",
(input.Sha
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"url",
(input.Url
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
node :> _
@@ -987,44 +914,41 @@ module CommitStatsJsonSerializeExtension =
type CommitStats with
/// Serialize to a JSON node
- static member toJsonNode (input : CommitStats) : System.Text.Json.Nodes.JsonNode =
- let node = System.Text.Json.Nodes.JsonObject ()
+ static member toJsonNode(input: CommitStats) : System.Text.Json.Nodes.JsonNode =
+ let node = System.Text.Json.Nodes.JsonObject()
do
- for KeyValue (key, value) in input.AdditionalProperties do
- node.Add (key, id value)
+ for KeyValue(key, value) in input.AdditionalProperties do
+ node.Add(key, id value)
- node.Add (
+ node.Add(
"additions",
(input.Additions
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"deletions",
(input.Deletions
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"total",
(input.Total
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
node :> _
@@ -1039,44 +963,41 @@ module CommitUserJsonSerializeExtension =
type CommitUser with
/// Serialize to a JSON node
- static member toJsonNode (input : CommitUser) : System.Text.Json.Nodes.JsonNode =
- let node = System.Text.Json.Nodes.JsonObject ()
+ static member toJsonNode(input: CommitUser) : System.Text.Json.Nodes.JsonNode =
+ let node = System.Text.Json.Nodes.JsonObject()
do
- for KeyValue (key, value) in input.AdditionalProperties do
- node.Add (key, id value)
+ for KeyValue(key, value) in input.AdditionalProperties do
+ node.Add(key, id value)
- node.Add (
+ node.Add(
"date",
(input.Date
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"email",
(input.Email
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"name",
(input.Name
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
node :> _
@@ -1091,16 +1012,16 @@ module CreateAccessTokenOptionJsonSerializeExtension =
type CreateAccessTokenOption with
/// Serialize to a JSON node
- static member toJsonNode (input : CreateAccessTokenOption) : System.Text.Json.Nodes.JsonNode =
- let node = System.Text.Json.Nodes.JsonObject ()
+ static member toJsonNode(input: CreateAccessTokenOption) : System.Text.Json.Nodes.JsonNode =
+ let node = System.Text.Json.Nodes.JsonObject()
do
- for KeyValue (key, value) in input.AdditionalProperties do
- node.Add (key, id value)
+ for KeyValue(key, value) in input.AdditionalProperties do
+ node.Add(key, id value)
- node.Add ("name", (input.Name |> System.Text.Json.Nodes.JsonValue.Create))
+ node.Add("name", (input.Name |> System.Text.Json.Nodes.JsonValue.Create))
- node.Add (
+ node.Add(
"scopes",
(input.Scopes
|> (fun field ->
@@ -1108,16 +1029,14 @@ module CreateAccessTokenOptionJsonSerializeExtension =
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
((fun field ->
- let arr = System.Text.Json.Nodes.JsonArray ()
+ let arr = System.Text.Json.Nodes.JsonArray()
for mem in field do
- arr.Add (System.Text.Json.Nodes.JsonValue.Create mem)
+ arr.Add(System.Text.Json.Nodes.JsonValue.Create mem)
- arr
- )
+ arr)
field)
- :> System.Text.Json.Nodes.JsonNode
- ))
+ :> System.Text.Json.Nodes.JsonNode))
)
node :> _
@@ -1132,14 +1051,14 @@ module CreateBranchProtectionOptionJsonSerializeExtension =
type CreateBranchProtectionOption with
/// Serialize to a JSON node
- static member toJsonNode (input : CreateBranchProtectionOption) : System.Text.Json.Nodes.JsonNode =
- let node = System.Text.Json.Nodes.JsonObject ()
+ static member toJsonNode(input: CreateBranchProtectionOption) : System.Text.Json.Nodes.JsonNode =
+ let node = System.Text.Json.Nodes.JsonObject()
do
- for KeyValue (key, value) in input.AdditionalProperties do
- node.Add (key, id value)
+ for KeyValue(key, value) in input.AdditionalProperties do
+ node.Add(key, id value)
- node.Add (
+ node.Add(
"approvals_whitelist_teams",
(input.ApprovalsWhitelistTeams
|> (fun field ->
@@ -1147,19 +1066,17 @@ module CreateBranchProtectionOptionJsonSerializeExtension =
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
((fun field ->
- let arr = System.Text.Json.Nodes.JsonArray ()
+ let arr = System.Text.Json.Nodes.JsonArray()
for mem in field do
- arr.Add (System.Text.Json.Nodes.JsonValue.Create mem)
+ arr.Add(System.Text.Json.Nodes.JsonValue.Create mem)
- arr
- )
+ arr)
field)
- :> System.Text.Json.Nodes.JsonNode
- ))
+ :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"approvals_whitelist_username",
(input.ApprovalsWhitelistUsername
|> (fun field ->
@@ -1167,129 +1084,117 @@ module CreateBranchProtectionOptionJsonSerializeExtension =
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
((fun field ->
- let arr = System.Text.Json.Nodes.JsonArray ()
+ let arr = System.Text.Json.Nodes.JsonArray()
for mem in field do
- arr.Add (System.Text.Json.Nodes.JsonValue.Create mem)
+ arr.Add(System.Text.Json.Nodes.JsonValue.Create mem)
- arr
- )
+ arr)
field)
- :> System.Text.Json.Nodes.JsonNode
- ))
+ :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"block_on_official_review_requests",
(input.BlockOnOfficialReviewRequests
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"block_on_outdated_branch",
(input.BlockOnOutdatedBranch
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"block_on_rejected_reviews",
(input.BlockOnRejectedReviews
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"branch_name",
(input.BranchName
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"dismiss_stale_approvals",
(input.DismissStaleApprovals
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"enable_approvals_whitelist",
(input.EnableApprovalsWhitelist
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"enable_merge_whitelist",
(input.EnableMergeWhitelist
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"enable_push",
(input.EnablePush
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"enable_push_whitelist",
(input.EnablePushWhitelist
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"enable_status_check",
(input.EnableStatusCheck
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"merge_whitelist_teams",
(input.MergeWhitelistTeams
|> (fun field ->
@@ -1297,19 +1202,17 @@ module CreateBranchProtectionOptionJsonSerializeExtension =
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
((fun field ->
- let arr = System.Text.Json.Nodes.JsonArray ()
+ let arr = System.Text.Json.Nodes.JsonArray()
for mem in field do
- arr.Add (System.Text.Json.Nodes.JsonValue.Create mem)
+ arr.Add(System.Text.Json.Nodes.JsonValue.Create mem)
- arr
- )
+ arr)
field)
- :> System.Text.Json.Nodes.JsonNode
- ))
+ :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"merge_whitelist_usernames",
(input.MergeWhitelistUsernames
|> (fun field ->
@@ -1317,41 +1220,37 @@ module CreateBranchProtectionOptionJsonSerializeExtension =
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
((fun field ->
- let arr = System.Text.Json.Nodes.JsonArray ()
+ let arr = System.Text.Json.Nodes.JsonArray()
for mem in field do
- arr.Add (System.Text.Json.Nodes.JsonValue.Create mem)
+ arr.Add(System.Text.Json.Nodes.JsonValue.Create mem)
- arr
- )
+ arr)
field)
- :> System.Text.Json.Nodes.JsonNode
- ))
+ :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"protected_file_patterns",
(input.ProtectedFilePatterns
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"push_whitelist_deploy_keys",
(input.PushWhitelistDeployKeys
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"push_whitelist_teams",
(input.PushWhitelistTeams
|> (fun field ->
@@ -1359,19 +1258,17 @@ module CreateBranchProtectionOptionJsonSerializeExtension =
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
((fun field ->
- let arr = System.Text.Json.Nodes.JsonArray ()
+ let arr = System.Text.Json.Nodes.JsonArray()
for mem in field do
- arr.Add (System.Text.Json.Nodes.JsonValue.Create mem)
+ arr.Add(System.Text.Json.Nodes.JsonValue.Create mem)
- arr
- )
+ arr)
field)
- :> System.Text.Json.Nodes.JsonNode
- ))
+ :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"push_whitelist_usernames",
(input.PushWhitelistUsernames
|> (fun field ->
@@ -1379,52 +1276,47 @@ module CreateBranchProtectionOptionJsonSerializeExtension =
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
((fun field ->
- let arr = System.Text.Json.Nodes.JsonArray ()
+ let arr = System.Text.Json.Nodes.JsonArray()
for mem in field do
- arr.Add (System.Text.Json.Nodes.JsonValue.Create mem)
+ arr.Add(System.Text.Json.Nodes.JsonValue.Create mem)
- arr
- )
+ arr)
field)
- :> System.Text.Json.Nodes.JsonNode
- ))
+ :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"require_signed_commits",
(input.RequireSignedCommits
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"required_approvals",
(input.RequiredApprovals
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"rule_name",
(input.RuleName
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"status_check_contexts",
(input.StatusCheckContexts
|> (fun field ->
@@ -1432,27 +1324,24 @@ module CreateBranchProtectionOptionJsonSerializeExtension =
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
((fun field ->
- let arr = System.Text.Json.Nodes.JsonArray ()
+ let arr = System.Text.Json.Nodes.JsonArray()
for mem in field do
- arr.Add (System.Text.Json.Nodes.JsonValue.Create mem)
+ arr.Add(System.Text.Json.Nodes.JsonValue.Create mem)
- arr
- )
+ arr)
field)
- :> System.Text.Json.Nodes.JsonNode
- ))
+ :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"unprotected_file_patterns",
(input.UnprotectedFilePatterns
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
node :> _
@@ -1467,24 +1356,23 @@ module CreateBranchRepoOptionJsonSerializeExtension =
type CreateBranchRepoOption with
/// Serialize to a JSON node
- static member toJsonNode (input : CreateBranchRepoOption) : System.Text.Json.Nodes.JsonNode =
- let node = System.Text.Json.Nodes.JsonObject ()
+ static member toJsonNode(input: CreateBranchRepoOption) : System.Text.Json.Nodes.JsonNode =
+ let node = System.Text.Json.Nodes.JsonObject()
do
- for KeyValue (key, value) in input.AdditionalProperties do
- node.Add (key, id value)
+ for KeyValue(key, value) in input.AdditionalProperties do
+ node.Add(key, id value)
- node.Add ("new_branch_name", (input.NewBranchName |> System.Text.Json.Nodes.JsonValue.Create))
+ node.Add("new_branch_name", (input.NewBranchName |> System.Text.Json.Nodes.JsonValue.Create))
- node.Add (
+ node.Add(
"old_branch_name",
(input.OldBranchName
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
node :> _
@@ -1499,14 +1387,14 @@ module CreateEmailOptionJsonSerializeExtension =
type CreateEmailOption with
/// Serialize to a JSON node
- static member toJsonNode (input : CreateEmailOption) : System.Text.Json.Nodes.JsonNode =
- let node = System.Text.Json.Nodes.JsonObject ()
+ static member toJsonNode(input: CreateEmailOption) : System.Text.Json.Nodes.JsonNode =
+ let node = System.Text.Json.Nodes.JsonObject()
do
- for KeyValue (key, value) in input.AdditionalProperties do
- node.Add (key, id value)
+ for KeyValue(key, value) in input.AdditionalProperties do
+ node.Add(key, id value)
- node.Add (
+ node.Add(
"emails",
(input.Emails
|> (fun field ->
@@ -1514,16 +1402,14 @@ module CreateEmailOptionJsonSerializeExtension =
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
((fun field ->
- let arr = System.Text.Json.Nodes.JsonArray ()
+ let arr = System.Text.Json.Nodes.JsonArray()
for mem in field do
- arr.Add (System.Text.Json.Nodes.JsonValue.Create mem)
+ arr.Add(System.Text.Json.Nodes.JsonValue.Create mem)
- arr
- )
+ arr)
field)
- :> System.Text.Json.Nodes.JsonNode
- ))
+ :> System.Text.Json.Nodes.JsonNode))
)
node :> _
@@ -1538,33 +1424,31 @@ module CreateForkOptionJsonSerializeExtension =
type CreateForkOption with
/// Serialize to a JSON node
- static member toJsonNode (input : CreateForkOption) : System.Text.Json.Nodes.JsonNode =
- let node = System.Text.Json.Nodes.JsonObject ()
+ static member toJsonNode(input: CreateForkOption) : System.Text.Json.Nodes.JsonNode =
+ let node = System.Text.Json.Nodes.JsonObject()
do
- for KeyValue (key, value) in input.AdditionalProperties do
- node.Add (key, id value)
+ for KeyValue(key, value) in input.AdditionalProperties do
+ node.Add(key, id value)
- node.Add (
+ node.Add(
"name",
(input.Name
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"organization",
(input.Organization
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
node :> _
@@ -1579,27 +1463,26 @@ module CreateGPGKeyOptionJsonSerializeExtension =
type CreateGPGKeyOption with
/// Serialize to a JSON node
- static member toJsonNode (input : CreateGPGKeyOption) : System.Text.Json.Nodes.JsonNode =
- let node = System.Text.Json.Nodes.JsonObject ()
+ static member toJsonNode(input: CreateGPGKeyOption) : System.Text.Json.Nodes.JsonNode =
+ let node = System.Text.Json.Nodes.JsonObject()
do
- for KeyValue (key, value) in input.AdditionalProperties do
- node.Add (key, id value)
+ for KeyValue(key, value) in input.AdditionalProperties do
+ node.Add(key, id value)
- node.Add (
+ node.Add(
"armored_public_key",
(input.ArmoredPublicKey |> System.Text.Json.Nodes.JsonValue.Create)
)
- node.Add (
+ node.Add(
"armored_signature",
(input.ArmoredSignature
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
node :> _
@@ -1614,12 +1497,12 @@ module CreateHookOptionConfigJsonSerializeExtension =
type CreateHookOptionConfig with
/// Serialize to a JSON node
- static member toJsonNode (input : CreateHookOptionConfig) : System.Text.Json.Nodes.JsonNode =
- let node = System.Text.Json.Nodes.JsonObject ()
+ static member toJsonNode(input: CreateHookOptionConfig) : System.Text.Json.Nodes.JsonNode =
+ let node = System.Text.Json.Nodes.JsonObject()
do
- for KeyValue (key, value) in input.AdditionalProperties do
- node.Add (key, System.Text.Json.Nodes.JsonValue.Create value)
+ for KeyValue(key, value) in input.AdditionalProperties do
+ node.Add(key, System.Text.Json.Nodes.JsonValue.Create value)
node :> _
namespace Gitea
@@ -1633,14 +1516,14 @@ module CreateIssueCommentOptionJsonSerializeExtension =
type CreateIssueCommentOption with
/// Serialize to a JSON node
- static member toJsonNode (input : CreateIssueCommentOption) : System.Text.Json.Nodes.JsonNode =
- let node = System.Text.Json.Nodes.JsonObject ()
+ static member toJsonNode(input: CreateIssueCommentOption) : System.Text.Json.Nodes.JsonNode =
+ let node = System.Text.Json.Nodes.JsonObject()
do
- for KeyValue (key, value) in input.AdditionalProperties do
- node.Add (key, id value)
+ for KeyValue(key, value) in input.AdditionalProperties do
+ node.Add(key, id value)
- node.Add ("body", (input.Body |> System.Text.Json.Nodes.JsonValue.Create))
+ node.Add("body", (input.Body |> System.Text.Json.Nodes.JsonValue.Create))
node :> _
namespace Gitea
@@ -1654,25 +1537,24 @@ module CreateIssueOptionJsonSerializeExtension =
type CreateIssueOption with
/// Serialize to a JSON node
- static member toJsonNode (input : CreateIssueOption) : System.Text.Json.Nodes.JsonNode =
- let node = System.Text.Json.Nodes.JsonObject ()
+ static member toJsonNode(input: CreateIssueOption) : System.Text.Json.Nodes.JsonNode =
+ let node = System.Text.Json.Nodes.JsonObject()
do
- for KeyValue (key, value) in input.AdditionalProperties do
- node.Add (key, id value)
+ for KeyValue(key, value) in input.AdditionalProperties do
+ node.Add(key, id value)
- node.Add (
+ node.Add(
"assignee",
(input.Assignee
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"assignees",
(input.Assignees
|> (fun field ->
@@ -1680,52 +1562,47 @@ module CreateIssueOptionJsonSerializeExtension =
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
((fun field ->
- let arr = System.Text.Json.Nodes.JsonArray ()
+ let arr = System.Text.Json.Nodes.JsonArray()
for mem in field do
- arr.Add (System.Text.Json.Nodes.JsonValue.Create mem)
+ arr.Add(System.Text.Json.Nodes.JsonValue.Create mem)
- arr
- )
+ arr)
field)
- :> System.Text.Json.Nodes.JsonNode
- ))
+ :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"body",
(input.Body
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"closed",
(input.Closed
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"due_date",
(input.DueDate
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"labels",
(input.Labels
|> (fun field ->
@@ -1733,41 +1610,37 @@ module CreateIssueOptionJsonSerializeExtension =
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
((fun field ->
- let arr = System.Text.Json.Nodes.JsonArray ()
+ let arr = System.Text.Json.Nodes.JsonArray()
for mem in field do
- arr.Add (System.Text.Json.Nodes.JsonValue.Create mem)
+ arr.Add(System.Text.Json.Nodes.JsonValue.Create mem)
- arr
- )
+ arr)
field)
- :> System.Text.Json.Nodes.JsonNode
- ))
+ :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"milestone",
(input.Milestone
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"ref",
(input.Ref
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add ("title", (input.Title |> System.Text.Json.Nodes.JsonValue.Create))
+ node.Add("title", (input.Title |> System.Text.Json.Nodes.JsonValue.Create))
node :> _
namespace Gitea
@@ -1781,27 +1654,26 @@ module CreateKeyOptionJsonSerializeExtension =
type CreateKeyOption with
/// Serialize to a JSON node
- static member toJsonNode (input : CreateKeyOption) : System.Text.Json.Nodes.JsonNode =
- let node = System.Text.Json.Nodes.JsonObject ()
+ static member toJsonNode(input: CreateKeyOption) : System.Text.Json.Nodes.JsonNode =
+ let node = System.Text.Json.Nodes.JsonObject()
do
- for KeyValue (key, value) in input.AdditionalProperties do
- node.Add (key, id value)
+ for KeyValue(key, value) in input.AdditionalProperties do
+ node.Add(key, id value)
- node.Add ("key", (input.Key |> System.Text.Json.Nodes.JsonValue.Create))
+ node.Add("key", (input.Key |> System.Text.Json.Nodes.JsonValue.Create))
- node.Add (
+ node.Add(
"read_only",
(input.ReadOnly
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add ("title", (input.Title |> System.Text.Json.Nodes.JsonValue.Create))
+ node.Add("title", (input.Title |> System.Text.Json.Nodes.JsonValue.Create))
node :> _
namespace Gitea
@@ -1815,38 +1687,36 @@ module CreateLabelOptionJsonSerializeExtension =
type CreateLabelOption with
/// Serialize to a JSON node
- static member toJsonNode (input : CreateLabelOption) : System.Text.Json.Nodes.JsonNode =
- let node = System.Text.Json.Nodes.JsonObject ()
+ static member toJsonNode(input: CreateLabelOption) : System.Text.Json.Nodes.JsonNode =
+ let node = System.Text.Json.Nodes.JsonObject()
do
- for KeyValue (key, value) in input.AdditionalProperties do
- node.Add (key, id value)
+ for KeyValue(key, value) in input.AdditionalProperties do
+ node.Add(key, id value)
- node.Add ("color", (input.Color |> System.Text.Json.Nodes.JsonValue.Create))
+ node.Add("color", (input.Color |> System.Text.Json.Nodes.JsonValue.Create))
- node.Add (
+ node.Add(
"description",
(input.Description
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"exclusive",
(input.Exclusive
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add ("name", (input.Name |> System.Text.Json.Nodes.JsonValue.Create))
+ node.Add("name", (input.Name |> System.Text.Json.Nodes.JsonValue.Create))
node :> _
namespace Gitea
@@ -1860,55 +1730,51 @@ module CreateMilestoneOptionJsonSerializeExtension =
type CreateMilestoneOption with
/// Serialize to a JSON node
- static member toJsonNode (input : CreateMilestoneOption) : System.Text.Json.Nodes.JsonNode =
- let node = System.Text.Json.Nodes.JsonObject ()
+ static member toJsonNode(input: CreateMilestoneOption) : System.Text.Json.Nodes.JsonNode =
+ let node = System.Text.Json.Nodes.JsonObject()
do
- for KeyValue (key, value) in input.AdditionalProperties do
- node.Add (key, id value)
+ for KeyValue(key, value) in input.AdditionalProperties do
+ node.Add(key, id value)
- node.Add (
+ node.Add(
"description",
(input.Description
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"due_on",
(input.DueOn
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"state",
(input.State
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"title",
(input.Title
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
node :> _
@@ -1923,36 +1789,34 @@ module CreateOAuth2ApplicationOptionsJsonSerializeExtension =
type CreateOAuth2ApplicationOptions with
/// Serialize to a JSON node
- static member toJsonNode (input : CreateOAuth2ApplicationOptions) : System.Text.Json.Nodes.JsonNode =
- let node = System.Text.Json.Nodes.JsonObject ()
+ static member toJsonNode(input: CreateOAuth2ApplicationOptions) : System.Text.Json.Nodes.JsonNode =
+ let node = System.Text.Json.Nodes.JsonObject()
do
- for KeyValue (key, value) in input.AdditionalProperties do
- node.Add (key, id value)
+ for KeyValue(key, value) in input.AdditionalProperties do
+ node.Add(key, id value)
- node.Add (
+ node.Add(
"confidential_client",
(input.ConfidentialClient
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode
- ))
+ (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode))
)
- node.Add (
+ node.Add(
"name",
(input.Name
|> (fun field ->
match field with
| None -> null :> System.Text.Json.Nodes.JsonNode
| Some field ->
- (System.Text.Json.Nodes.JsonValue.Create