From 7930039ad159871e21cee9d1a661e4f096b05f68 Mon Sep 17 00:00:00 2001 From: Patrick Stevens <3138005+Smaug123@users.noreply.github.com> Date: Sun, 20 Apr 2025 18:02:40 +0100 Subject: [PATCH] Revert "Some fixes to nullability (#365)" (#366) This reverts commit 8d275f004767a7d2fc1ea674e7199fd25ff14535. --- ConsumePlugin/ConsumePlugin.fsproj | 4 - ConsumePlugin/Generated2SwaggerGitea.fs | 1491 +---------------- ConsumePlugin/GeneratedJson.fs | 13 +- ConsumePlugin/GeneratedJsonParseNullness.fs | 53 - ConsumePlugin/GeneratedPureGymDto.fs | 2 - ConsumePlugin/GeneratedRestClient.fs | 76 +- ConsumePlugin/GeneratedSerde.fs | 4 - ConsumePlugin/GeneratedVault.fs | 33 - ConsumePlugin/JsonParseNullness.fs | 13 - .../TestJsonParse/TestJsonNullability.fs | 23 - .../WoofWare.Myriad.Plugins.Test.fsproj | 1 - WoofWare.Myriad.Plugins/AstHelper.fs | 16 - .../HttpClientGenerator.fs | 21 +- WoofWare.Myriad.Plugins/JsonParseGenerator.fs | 12 +- 14 files changed, 65 insertions(+), 1697 deletions(-) delete mode 100644 ConsumePlugin/GeneratedJsonParseNullness.fs delete mode 100644 ConsumePlugin/JsonParseNullness.fs delete mode 100644 WoofWare.Myriad.Plugins.Test/TestJsonParse/TestJsonNullability.fs diff --git a/ConsumePlugin/ConsumePlugin.fsproj b/ConsumePlugin/ConsumePlugin.fsproj index 6c73f39..7d053e9 100644 --- a/ConsumePlugin/ConsumePlugin.fsproj +++ b/ConsumePlugin/ConsumePlugin.fsproj @@ -11,10 +11,6 @@ - - - JsonParseNullness.fs - diff --git a/ConsumePlugin/Generated2SwaggerGitea.fs b/ConsumePlugin/Generated2SwaggerGitea.fs index fc1b4e5..5c2fc5b 100644 --- a/ConsumePlugin/Generated2SwaggerGitea.fs +++ b/ConsumePlugin/Generated2SwaggerGitea.fs @@ -14652,7 +14652,6 @@ module AccessTokenJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -14960,7 +14959,6 @@ module BranchProtectionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -14985,7 +14983,6 @@ module BranchProtectionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -14995,7 +14992,6 @@ module BranchProtectionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -15015,7 +15011,6 @@ module BranchProtectionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -15025,7 +15020,6 @@ module BranchProtectionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -15090,7 +15084,6 @@ module BranchProtectionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -15100,7 +15093,6 @@ module BranchProtectionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -15486,7 +15478,6 @@ module CreateAccessTokenOptionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -15542,7 +15533,6 @@ module CreateBranchProtectionOptionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -15567,7 +15557,6 @@ module CreateBranchProtectionOptionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -15577,7 +15566,6 @@ module CreateBranchProtectionOptionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -15597,7 +15585,6 @@ module CreateBranchProtectionOptionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -15607,7 +15594,6 @@ module CreateBranchProtectionOptionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -15667,7 +15653,6 @@ module CreateBranchProtectionOptionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -15677,7 +15662,6 @@ module CreateBranchProtectionOptionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -15807,7 +15791,6 @@ module CreateEmailOptionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -16023,7 +16006,6 @@ module CreateIssueOptionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -16048,7 +16030,6 @@ module CreateIssueOptionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -16284,7 +16265,6 @@ module CreateOAuth2ApplicationOptionsJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -16428,7 +16408,6 @@ module CreatePullRequestOptionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -16458,7 +16437,6 @@ module CreatePullRequestOptionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -16967,7 +16945,6 @@ module CreateTeamOptionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -17285,7 +17262,6 @@ module DeleteEmailOptionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -17394,7 +17370,6 @@ module EditBranchProtectionOptionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -17414,7 +17389,6 @@ module EditBranchProtectionOptionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -17424,7 +17398,6 @@ module EditBranchProtectionOptionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -17444,7 +17417,6 @@ module EditBranchProtectionOptionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -17454,7 +17426,6 @@ module EditBranchProtectionOptionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -17509,7 +17480,6 @@ module EditBranchProtectionOptionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -17519,7 +17489,6 @@ module EditBranchProtectionOptionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -17706,7 +17675,6 @@ module EditHookOptionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -17846,7 +17814,6 @@ module EditIssueOptionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -18099,7 +18066,6 @@ module EditPullRequestOptionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -18124,7 +18090,6 @@ module EditPullRequestOptionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -18336,7 +18301,6 @@ module EditTeamOptionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -18737,7 +18701,6 @@ module FileCommitResponseJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> CommitMeta.jsonParse elt) |> List.ofSeq |> Some @@ -19089,7 +19052,6 @@ module GeneralUISettingsJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -19099,7 +19061,6 @@ module GeneralUISettingsJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -19491,7 +19452,6 @@ module GitTreeResponseJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> GitEntry.jsonParse elt) |> List.ofSeq |> Some @@ -19608,7 +19568,6 @@ module HookJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -19847,7 +19806,6 @@ module IssueLabelsOptionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -20300,7 +20258,6 @@ module NodeInfoServicesJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -20310,7 +20267,6 @@ module NodeInfoServicesJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -20475,7 +20431,6 @@ module OAuth2ApplicationJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -20924,7 +20879,6 @@ module PullReviewRequestOptionsJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -20934,7 +20888,6 @@ module PullReviewRequestOptionsJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -21102,7 +21055,6 @@ module RepoTopicOptionsJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -21446,7 +21398,6 @@ module TeamJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -21537,7 +21488,6 @@ module TopicNameJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -21635,7 +21585,6 @@ module TransferRepoOptionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -22313,7 +22262,6 @@ module WikiCommitListJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> WikiCommit.jsonParse elt) |> List.ofSeq |> Some @@ -22537,7 +22485,6 @@ module CommentJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> Attachment.jsonParse elt) |> List.ofSeq |> Some @@ -22924,7 +22871,6 @@ module CreateHookOptionJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -23011,7 +22957,6 @@ module CreatePullReviewOptionsJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> CreatePullReviewComment.jsonParse elt) |> List.ofSeq |> Some @@ -23431,7 +23376,6 @@ module IssueTemplateJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -23451,7 +23395,6 @@ module IssueTemplateJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> IssueFormField.jsonParse elt) |> List.ofSeq |> Some @@ -24258,7 +24201,6 @@ module ReleaseJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> Attachment.jsonParse elt) |> List.ofSeq |> Some @@ -24439,12 +24381,7 @@ module RepoTransferJsonParseExtension = let arg_3 = match node.["teams"] with | null -> None - | v -> - v.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> Team.jsonParse elt) - |> List.ofSeq - |> Some + | v -> v.AsArray () |> Seq.map (fun elt -> Team.jsonParse elt) |> List.ofSeq |> Some let arg_2 = match node.["recipient"] with @@ -24888,7 +24825,6 @@ module SearchResultsJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> Repository.jsonParse elt) |> List.ofSeq |> Some @@ -25014,7 +24950,6 @@ module CombinedStatusJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> CommitStatus.jsonParse elt) |> List.ofSeq |> Some @@ -25101,7 +25036,6 @@ module CommitJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> CommitMeta.jsonParse elt) |> List.ofSeq |> Some @@ -25116,7 +25050,6 @@ module CommitJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> CommitAffectedFiles.jsonParse elt) |> List.ofSeq |> Some @@ -25433,12 +25366,7 @@ module IssueJsonParseExtension = let arg_12 = match node.["labels"] with | null -> None - | v -> - v.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> Label.jsonParse elt) - |> List.ofSeq - |> Some + | v -> v.AsArray () |> Seq.map (fun elt -> Label.jsonParse elt) |> List.ofSeq |> Some let arg_11 = match node.["is_locked"] with @@ -25483,12 +25411,7 @@ module IssueJsonParseExtension = let arg_3 = match node.["assignees"] with | null -> None - | v -> - v.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> User.jsonParse elt) - |> List.ofSeq - |> Some + | v -> v.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq |> Some let arg_2 = match node.["assignee"] with @@ -25500,7 +25423,6 @@ module IssueJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> Attachment.jsonParse elt) |> List.ofSeq |> Some @@ -25606,7 +25528,6 @@ module NodeInfoJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -25940,7 +25861,6 @@ module PayloadCommitJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -25950,7 +25870,6 @@ module PayloadCommitJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -25980,7 +25899,6 @@ module PayloadCommitJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -26106,12 +26024,7 @@ module PullRequestJsonParseExtension = let arg_15 = match node.["labels"] with | null -> None - | v -> - v.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> Label.jsonParse elt) - |> List.ofSeq - |> Some + | v -> v.AsArray () |> Seq.map (fun elt -> Label.jsonParse elt) |> List.ofSeq |> Some let arg_14 = match node.["is_locked"] with @@ -26171,12 +26084,7 @@ module PullRequestJsonParseExtension = let arg_3 = match node.["assignees"] with | null -> None - | v -> - v.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> User.jsonParse elt) - |> List.ofSeq - |> Some + | v -> v.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq |> Some let arg_2 = match node.["assignee"] with @@ -26366,7 +26274,6 @@ module BranchJsonParseExtension = | null -> None | v -> v.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -26755,11 +26662,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return ActivityPub.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -26844,16 +26746,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> Cron.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> Cron.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -26936,16 +26829,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> Hook.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> Hook.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -26994,11 +26878,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Hook.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -27041,11 +26920,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Hook.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -27098,11 +26972,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Hook.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -27150,14 +27019,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> Organization.jsonParse elt) |> List.ofSeq } @@ -27213,14 +27076,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq } @@ -27349,16 +27206,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> User.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -27407,11 +27255,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return User.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -27510,11 +27353,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return User.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -27570,11 +27408,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return PublicKey.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -27670,11 +27503,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Organization.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -27730,11 +27558,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Repository.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -27890,11 +27713,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return NodeInfo.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -27963,14 +27781,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> NotificationThread.jsonParse elt) |> List.ofSeq } @@ -28031,14 +27843,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> NotificationThread.jsonParse elt) |> List.ofSeq } @@ -28079,11 +27885,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return NotificationCount.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -28127,11 +27928,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return NotificationThread.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -28183,11 +27979,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return NotificationThread.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -28242,11 +28033,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Repository.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -28294,14 +28080,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> Organization.jsonParse elt) |> List.ofSeq } @@ -28352,11 +28132,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Organization.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -28399,11 +28174,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Organization.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -28492,11 +28262,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Organization.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -28549,16 +28314,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> Hook.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> Hook.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -28612,11 +28368,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Hook.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -28661,11 +28412,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Hook.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -28760,11 +28506,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Hook.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -28817,16 +28558,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> Label.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> Label.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -28880,11 +28612,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Label.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -28929,11 +28656,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Label.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -29028,11 +28750,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Label.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -29085,16 +28802,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> User.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -29223,16 +28931,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> User.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -29404,14 +29103,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> Repository.jsonParse elt) |> List.ofSeq } @@ -29467,11 +29160,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Repository.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -29524,16 +29212,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> Team.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> Team.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -29587,11 +29266,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Team.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -29714,16 +29388,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> Package.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> Package.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -29777,11 +29442,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Package.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -29884,14 +29544,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> PackageFile.jsonParse elt) |> List.ofSeq } @@ -29991,16 +29645,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> Issue.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> Issue.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -30049,11 +29694,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Repository.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -30152,11 +29792,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return SearchResults.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -30201,11 +29836,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Repository.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -30300,11 +29930,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Repository.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -30390,16 +30015,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> User.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -30445,14 +30061,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> BranchProtection.jsonParse elt) |> List.ofSeq } @@ -30515,11 +30125,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return BranchProtection.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -30567,11 +30172,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return BranchProtection.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -30676,11 +30276,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return BranchProtection.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -30735,16 +30330,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> Branch.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> Branch.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -30805,11 +30391,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Branch.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -30857,11 +30438,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Branch.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -30957,16 +30533,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> User.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -31152,11 +30719,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return RepoCollaboratorPermission.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -31226,16 +30788,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> Commit.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> Commit.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -31297,11 +30850,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return CombinedStatus.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -31370,14 +30918,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> CommitStatus.jsonParse elt) |> List.ofSeq } @@ -31431,14 +30973,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> ContentsResponse.jsonParse elt) |> List.ofSeq } @@ -31499,11 +31035,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return ContentsResponse.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -31567,11 +31098,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return FileResponse.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -31635,11 +31161,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return FileDeleteResponse.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -31703,11 +31224,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return FileResponse.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -31764,11 +31280,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return FileResponse.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -31876,14 +31387,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> Repository.jsonParse elt) |> List.ofSeq } @@ -31941,11 +31446,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Repository.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -31993,11 +31493,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return GitBlobResponse.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -32045,11 +31540,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Commit.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -32146,11 +31636,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Note.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -32197,14 +31682,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> Reference.jsonParse elt) |> List.ofSeq } @@ -32253,14 +31732,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> Reference.jsonParse elt) |> List.ofSeq } @@ -32309,11 +31782,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return AnnotatedTag.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -32379,11 +31847,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return GitTreeResponse.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -32438,16 +31901,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> Hook.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> Hook.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -32503,11 +31957,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Hook.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -32552,16 +32001,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> GitHook.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> GitHook.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -32608,11 +32048,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return GitHook.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -32717,11 +32152,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return GitHook.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -32769,11 +32199,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Hook.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -32878,11 +32303,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Hook.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -32976,14 +32396,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> IssueTemplate.jsonParse elt) |> List.ofSeq } @@ -33075,16 +32489,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> Issue.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> Issue.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -33140,11 +32545,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Issue.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -33211,16 +32611,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> Comment.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> Comment.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -33308,14 +32699,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> Attachment.jsonParse elt) |> List.ofSeq } @@ -33374,11 +32759,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Attachment.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -33498,11 +32878,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Attachment.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -33550,16 +32925,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> Reaction.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> Reaction.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -33663,11 +33029,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Issue.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -33772,11 +33133,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Issue.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -33824,14 +33180,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> Attachment.jsonParse elt) |> List.ofSeq } @@ -33890,11 +33240,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Attachment.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -34014,11 +33359,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Attachment.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -34081,16 +33421,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> Comment.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> Comment.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -34153,11 +33484,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Comment.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -34263,11 +33589,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return IssueDeadline.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -34315,16 +33636,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> Label.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> Label.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -34387,16 +33699,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> Label.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> Label.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -34500,16 +33803,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> Label.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> Label.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -34613,16 +33907,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> Reaction.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> Reaction.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -34864,16 +34149,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> User.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -34920,11 +34196,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return WatchInfo.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -34993,14 +34264,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> TimelineComment.jsonParse elt) |> List.ofSeq } @@ -35073,14 +34338,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> TrackedTime.jsonParse elt) |> List.ofSeq } @@ -35145,11 +34404,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return TrackedTime.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -35299,14 +34553,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> DeployKey.jsonParse elt) |> List.ofSeq } @@ -35364,11 +34612,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return DeployKey.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -35416,11 +34659,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return DeployKey.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -35516,16 +34754,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> Label.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> Label.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -35581,11 +34810,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Label.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -35633,11 +34857,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Label.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -35742,11 +34961,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Label.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -35791,11 +35005,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return LanguageStatistics.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -35915,14 +35124,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> Milestone.jsonParse elt) |> List.ofSeq } @@ -35985,11 +35188,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Milestone.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -36037,11 +35235,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Milestone.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -36146,11 +35339,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Milestone.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -36264,14 +35452,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> NotificationThread.jsonParse elt) |> List.ofSeq } @@ -36339,14 +35521,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> NotificationThread.jsonParse elt) |> List.ofSeq } @@ -36420,14 +35596,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> PullRequest.jsonParse elt) |> List.ofSeq } @@ -36490,11 +35660,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return PullRequest.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -36542,11 +35707,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return PullRequest.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -36610,11 +35770,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return PullRequest.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -36733,16 +35888,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> Commit.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> Commit.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -36810,14 +35956,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> ChangedFile.jsonParse elt) |> List.ofSeq } @@ -37021,14 +36161,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> PullReview.jsonParse elt) |> List.ofSeq } @@ -37149,14 +36283,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> PullReview.jsonParse elt) |> List.ofSeq } @@ -37221,11 +36349,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return PullReview.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -37274,11 +36397,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return PullReview.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -37344,11 +36462,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return PullReview.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -37439,14 +36552,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> PullReviewComment.jsonParse elt) |> List.ofSeq } @@ -37513,11 +36620,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return PullReview.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -37566,11 +36668,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return PullReview.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -37678,14 +36775,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> PushMirror.jsonParse elt) |> List.ofSeq } @@ -37748,11 +36839,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return PushMirror.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -37840,11 +36926,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return PushMirror.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -38008,16 +37089,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> Release.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> Release.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -38078,11 +37150,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Release.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -38129,11 +37196,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Release.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -38181,11 +37243,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Release.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -38274,11 +37331,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Release.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -38383,11 +37435,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Release.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -38435,14 +37482,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> Attachment.jsonParse elt) |> List.ofSeq } @@ -38501,11 +37542,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Attachment.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -38625,11 +37661,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Attachment.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -38674,16 +37705,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> User.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -38775,16 +37797,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> User.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -38852,14 +37865,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> CommitStatus.jsonParse elt) |> List.ofSeq } @@ -38924,11 +37931,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return CommitStatus.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -38983,16 +37985,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> User.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -39038,11 +38031,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return WatchInfo.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -39129,11 +38117,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return WatchInfo.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -39188,16 +38171,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> Tag.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> Tag.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -39253,11 +38227,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Tag.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -39305,11 +38274,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Tag.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -39395,16 +38359,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> Team.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> Team.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -39451,11 +38406,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Team.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -39607,14 +38557,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> TrackedTime.jsonParse elt) |> List.ofSeq } @@ -39663,14 +38607,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> TrackedTime.jsonParse elt) |> List.ofSeq } @@ -39726,11 +38664,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return TopicName.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -39924,11 +38857,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Repository.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -39975,11 +38903,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Repository.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -40026,11 +38949,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Repository.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -40092,11 +39010,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return WikiPage.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -40144,11 +39057,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return WikiPage.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -40253,11 +39161,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return WikiPage.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -40312,14 +39215,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> WikiPageMetaData.jsonParse elt) |> List.ofSeq } @@ -40380,11 +39277,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return WikiCommitList.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -40452,11 +39344,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Repository.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -40499,11 +39386,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Repository.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -40543,11 +39425,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return GeneralAPISettings.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -40587,11 +39464,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return GeneralAttachmentSettings.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -40631,11 +39503,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return GeneralRepoSettings.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -40675,11 +39542,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return GeneralUISettings.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -40755,11 +39617,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Team.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -40848,11 +39705,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Team.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -40905,16 +39757,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> User.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -40958,11 +39801,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return User.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -41091,14 +39929,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> Repository.jsonParse elt) |> List.ofSeq } @@ -41147,11 +39979,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Repository.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -41283,14 +40110,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> TopicResponse.jsonParse elt) |> List.ofSeq } @@ -41331,11 +40152,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return User.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -41388,14 +40204,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> OAuth2Application.jsonParse elt) |> List.ofSeq } @@ -41448,11 +40258,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return OAuth2Application.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -41496,11 +40301,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return OAuth2Application.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -41593,11 +40393,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return OAuth2Application.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -41637,16 +40432,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> Email.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> Email.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -41695,16 +40481,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> Email.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> Email.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -41796,16 +40573,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> User.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -41854,16 +40622,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> User.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -42095,14 +40854,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> PublicKey.jsonParse elt) |> List.ofSeq } @@ -42153,11 +40906,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return PublicKey.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -42200,11 +40948,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return PublicKey.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -42288,14 +41031,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> Organization.jsonParse elt) |> List.ofSeq } @@ -42344,14 +41081,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> Repository.jsonParse elt) |> List.ofSeq } @@ -42402,11 +41133,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Repository.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -42446,14 +41172,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> UserSettings.jsonParse elt) |> List.ofSeq } @@ -42504,14 +41224,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> UserSettings.jsonParse elt) |> List.ofSeq } @@ -42560,14 +41274,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> Repository.jsonParse elt) |> List.ofSeq } @@ -42739,14 +41447,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> StopWatch.jsonParse elt) |> List.ofSeq } @@ -42800,14 +41502,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> Repository.jsonParse elt) |> List.ofSeq } @@ -42856,16 +41552,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> Team.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> Team.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -42924,14 +41611,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> TrackedTime.jsonParse elt) |> List.ofSeq } @@ -43023,11 +41704,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return User.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -43081,16 +41757,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> User.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -43143,16 +41810,7 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> User.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -43235,14 +41893,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> UserHeatmapData.jsonParse elt) |> List.ofSeq } @@ -43305,14 +41957,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> PublicKey.jsonParse elt) |> List.ofSeq } @@ -43367,14 +42013,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> Organization.jsonParse elt) |> List.ofSeq } @@ -43422,11 +42062,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return OrganizationPermissions.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -43480,14 +42115,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> Repository.jsonParse elt) |> List.ofSeq } @@ -43542,14 +42171,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> Repository.jsonParse elt) |> List.ofSeq } @@ -43604,14 +42227,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> Repository.jsonParse elt) |> List.ofSeq } @@ -43666,14 +42283,8 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return jsonNode.AsArray () - |> Seq.cast |> Seq.map (fun elt -> AccessToken.jsonParse elt) |> List.ofSeq } @@ -43730,11 +42341,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return AccessToken.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -43814,11 +42420,6 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return ServerVersion.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) diff --git a/ConsumePlugin/GeneratedJson.fs b/ConsumePlugin/GeneratedJson.fs index d8e510c..956fb22 100644 --- a/ConsumePlugin/GeneratedJson.fs +++ b/ConsumePlugin/GeneratedJson.fs @@ -71,7 +71,6 @@ module JsonRecordType = ) | v -> v) .AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> Array.ofSeq @@ -85,7 +84,6 @@ module JsonRecordType = ) | v -> v) .AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> Array.ofSeq @@ -111,7 +109,6 @@ module JsonRecordType = ) | v -> v) .AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq @@ -204,15 +201,7 @@ module ToGetExtensionMethodJsonParseExtension = /// Parse from a JSON node. static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : ToGetExtensionMethod = - let arg_20 = - let v = node.["whiskey"] - - System.Numerics.BigInteger.Parse ( - (match v with - | null -> raise (System.ArgumentNullException ()) - | v -> v) - .ToJsonString () - ) + let arg_20 = System.Numerics.BigInteger.Parse (node.["whiskey"].ToJsonString ()) let arg_19 = (match node.["victor"] with diff --git a/ConsumePlugin/GeneratedJsonParseNullness.fs b/ConsumePlugin/GeneratedJsonParseNullness.fs deleted file mode 100644 index 8f6df28..0000000 --- a/ConsumePlugin/GeneratedJsonParseNullness.fs +++ /dev/null @@ -1,53 +0,0 @@ -//------------------------------------------------------------------------------ -// This code was generated by myriad. -// Changes to this file will be lost when the code is regenerated. -//------------------------------------------------------------------------------ - - - -namespace ConsumePlugin - -/// Module containing JSON parsing methods for the InnerStruct type -[] -module InnerStruct = - /// Parse from a JSON node. - let jsonParse (node : System.Text.Json.Nodes.JsonNode) : InnerStruct = - let arg_0 = - (match node.["a"] with - | null -> - raise ( - System.Collections.Generic.KeyNotFoundException ( - sprintf "Required key '%s' not found on JSON object" ("a") - ) - ) - | v -> v) - .AsValue() - .GetValue () - - { - A = arg_0 - } -namespace ConsumePlugin - -/// Module containing JSON parsing methods for the ArrayOfInnerStruct type -[] -module ArrayOfInnerStruct = - /// Parse from a JSON node. - let jsonParse (node : System.Text.Json.Nodes.JsonNode) : ArrayOfInnerStruct = - let arg_0 = - (match node.["b"] with - | null -> - raise ( - System.Collections.Generic.KeyNotFoundException ( - sprintf "Required key '%s' not found on JSON object" ("b") - ) - ) - | v -> v) - .AsArray () - |> Seq.cast - |> Seq.map (fun elt -> InnerStruct.jsonParse elt) - |> Array.ofSeq - - { - B = arg_0 - } diff --git a/ConsumePlugin/GeneratedPureGymDto.fs b/ConsumePlugin/GeneratedPureGymDto.fs index 81e671b..4930adb 100644 --- a/ConsumePlugin/GeneratedPureGymDto.fs +++ b/ConsumePlugin/GeneratedPureGymDto.fs @@ -60,7 +60,6 @@ module GymOpeningHours = ) | v -> v) .AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq @@ -1039,7 +1038,6 @@ module Sessions = ) | v -> v) .AsArray () - |> Seq.cast |> Seq.map (fun elt -> Visit.jsonParse elt) |> List.ofSeq diff --git a/ConsumePlugin/GeneratedRestClient.fs b/ConsumePlugin/GeneratedRestClient.fs index a83080d..d1408ad 100644 --- a/ConsumePlugin/GeneratedRestClient.fs +++ b/ConsumePlugin/GeneratedRestClient.fs @@ -48,16 +48,7 @@ module PureGymApi = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - - return - jsonNode.AsArray () - |> Seq.cast - |> Seq.map (fun elt -> Gym.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray () |> Seq.map (fun elt -> Gym.jsonParse elt) |> List.ofSeq } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -91,11 +82,6 @@ module PureGymApi = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return GymAttendance.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -130,11 +116,6 @@ module PureGymApi = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return GymAttendance.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -165,11 +146,6 @@ module PureGymApi = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Member.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -203,11 +179,6 @@ module PureGymApi = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Gym.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -238,11 +209,6 @@ module PureGymApi = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return MemberActivityDto.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -273,11 +239,6 @@ module PureGymApi = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return UriThing.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -333,11 +294,6 @@ module PureGymApi = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return match jsonNode with | null -> None @@ -390,11 +346,6 @@ module PureGymApi = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Sessions.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -436,11 +387,6 @@ module PureGymApi = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return Sessions.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -932,11 +878,6 @@ module PureGymApi = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return new RestEase.Response<_> ( responseString, @@ -973,11 +914,6 @@ module PureGymApi = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return new RestEase.Response<_> ( responseString, @@ -1014,11 +950,6 @@ module PureGymApi = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return new RestEase.Response<_> ( responseString, @@ -1055,11 +986,6 @@ module PureGymApi = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return new RestEase.Response<_> ( responseString, diff --git a/ConsumePlugin/GeneratedSerde.fs b/ConsumePlugin/GeneratedSerde.fs index f5c6ed4..7a1d8c5 100644 --- a/ConsumePlugin/GeneratedSerde.fs +++ b/ConsumePlugin/GeneratedSerde.fs @@ -408,7 +408,6 @@ module InnerTypeWithBothJsonParseExtension = let value = (kvp.Value).AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq @@ -677,7 +676,6 @@ module JsonRecordTypeWithBothJsonParseExtension = ) | v -> v) .AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> Array.ofSeq @@ -691,7 +689,6 @@ module JsonRecordTypeWithBothJsonParseExtension = ) | v -> v) .AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> Array.ofSeq @@ -717,7 +714,6 @@ module JsonRecordTypeWithBothJsonParseExtension = ) | v -> v) .AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq diff --git a/ConsumePlugin/GeneratedVault.fs b/ConsumePlugin/GeneratedVault.fs index 9e7d318..14fec62 100644 --- a/ConsumePlugin/GeneratedVault.fs +++ b/ConsumePlugin/GeneratedVault.fs @@ -94,7 +94,6 @@ module JwtVaultAuthResponse = ) | v -> v) .AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq @@ -108,7 +107,6 @@ module JwtVaultAuthResponse = ) | v -> v) .AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq @@ -122,7 +120,6 @@ module JwtVaultAuthResponse = ) | v -> v) .AsArray () - |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq @@ -499,11 +496,6 @@ module VaultClient = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return JwtSecretResponse.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -540,11 +532,6 @@ module VaultClient = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return JwtVaultResponse.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -603,11 +590,6 @@ module VaultClientNonExtensionMethod = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return JwtSecretResponse.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -644,11 +626,6 @@ module VaultClientNonExtensionMethod = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return JwtVaultResponse.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -710,11 +687,6 @@ module VaultClientExtensionMethodHttpClientExtension = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return JwtSecretResponse.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -751,11 +723,6 @@ module VaultClientExtensionMethodHttpClientExtension = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - let jsonNode = - match jsonNode with - | null -> raise (System.ArgumentNullException ()) - | v -> v - return JwtVaultResponse.jsonParse jsonNode } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) diff --git a/ConsumePlugin/JsonParseNullness.fs b/ConsumePlugin/JsonParseNullness.fs deleted file mode 100644 index b4c1761..0000000 --- a/ConsumePlugin/JsonParseNullness.fs +++ /dev/null @@ -1,13 +0,0 @@ -namespace ConsumePlugin - -[] -type InnerStruct = - { - A : int - } - -[] -type ArrayOfInnerStruct = - { - B : InnerStruct array - } diff --git a/WoofWare.Myriad.Plugins.Test/TestJsonParse/TestJsonNullability.fs b/WoofWare.Myriad.Plugins.Test/TestJsonParse/TestJsonNullability.fs deleted file mode 100644 index b827701..0000000 --- a/WoofWare.Myriad.Plugins.Test/TestJsonParse/TestJsonNullability.fs +++ /dev/null @@ -1,23 +0,0 @@ -namespace WoofWare.Myriad.Plugins.Test - -open System.Text.Json.Nodes -open FsUnitTyped -open NUnit.Framework -open ConsumePlugin - -[] -module TestJsonNullability = - - [] - let ``Can consume JsonParseNullness`` () = - let options = JsonNodeOptions (PropertyNameCaseInsensitive = true) - - """{ - "b": null -}""" - |> fun s -> JsonNode.Parse (s, options) - |> ArrayOfInnerStruct.jsonParse - |> shouldEqual - { - B = null - } diff --git a/WoofWare.Myriad.Plugins.Test/WoofWare.Myriad.Plugins.Test.fsproj b/WoofWare.Myriad.Plugins.Test/WoofWare.Myriad.Plugins.Test.fsproj index daa7d16..c8f6a61 100644 --- a/WoofWare.Myriad.Plugins.Test/WoofWare.Myriad.Plugins.Test.fsproj +++ b/WoofWare.Myriad.Plugins.Test/WoofWare.Myriad.Plugins.Test.fsproj @@ -18,7 +18,6 @@ - diff --git a/WoofWare.Myriad.Plugins/AstHelper.fs b/WoofWare.Myriad.Plugins/AstHelper.fs index 0f4423e..d168672 100644 --- a/WoofWare.Myriad.Plugins/AstHelper.fs +++ b/WoofWare.Myriad.Plugins/AstHelper.fs @@ -356,19 +356,3 @@ module internal AstHelper = } ) | _ -> failwithf "Failed to get record elements for type that was: %+A" repr - - let raiseIfNull (variable : Ident) : SynExpr = - SynExpr.createMatch - (SynExpr.createIdent' variable) - [ - SynMatchClause.create - SynPat.createNull - (SynExpr.applyFunction - (SynExpr.createIdent "raise") - (SynExpr.paren ( - SynExpr.applyFunction - (SynExpr.createLongIdent [ "System" ; "ArgumentNullException" ]) - (SynExpr.CreateConst ()) - ))) - SynMatchClause.create (SynPat.named "v") (SynExpr.createIdent "v") - ] diff --git a/WoofWare.Myriad.Plugins/HttpClientGenerator.fs b/WoofWare.Myriad.Plugins/HttpClientGenerator.fs index a7539c7..11aafbc 100644 --- a/WoofWare.Myriad.Plugins/HttpClientGenerator.fs +++ b/WoofWare.Myriad.Plugins/HttpClientGenerator.fs @@ -1,5 +1,6 @@ namespace WoofWare.Myriad.Plugins +open System.IO open System.Net.Http open Fantomas.FCS.Syntax open WoofWare.Whippet.Fantomas @@ -13,6 +14,17 @@ type internal HttpClientGeneratorOutputSpec = module internal HttpClientGenerator = open Fantomas.FCS.Text.Range + let outputFile = FileInfo "/tmp/output.txt" + + // do + // use _ = File.Create outputFile.FullName + // () + + let log (line : string) = + // use w = outputFile.AppendText () + // w.WriteLine line + () + [] type PathSpec = | Verbatim of string @@ -556,9 +568,6 @@ module internal HttpClientGenerator = ) ) - let jsonNodeNotNull = - Let ("jsonNode", AstHelper.raiseIfNull (Ident.create "jsonNode")) - let setVariableHeaders = variableHeaders |> List.map (fun (headerName, callToGetValue) -> @@ -633,7 +642,6 @@ module internal HttpClientGenerator = yield responseString yield responseStream yield jsonNode - yield jsonNodeNotNull | String -> yield responseString | Stream -> yield responseStream | UnitType -> @@ -642,7 +650,6 @@ module internal HttpClientGenerator = | _ -> yield responseStream yield jsonNode - yield jsonNodeNotNull ] |> SynExpr.createCompExpr "async" returnExpr |> SynExpr.startAsTask cancellationTokenArg @@ -907,6 +914,10 @@ module internal HttpClientGenerator = "Create a REST client. The input functions will be re-evaluated on every HTTP request to obtain the required values for the corresponding header properties." |> PreXmlDoc.create + let functionName = Ident.create "client" + + let pattern = SynLongIdent.createS "make" + let returnInfo = SynType.createLongIdent interfaceType.Name let nameWithoutLeadingI = diff --git a/WoofWare.Myriad.Plugins/JsonParseGenerator.fs b/WoofWare.Myriad.Plugins/JsonParseGenerator.fs index 333ed7d..173c5f8 100644 --- a/WoofWare.Myriad.Plugins/JsonParseGenerator.fs +++ b/WoofWare.Myriad.Plugins/JsonParseGenerator.fs @@ -78,7 +78,6 @@ module internal JsonParseGenerator = /// collectionType is e.g. "List"; we'll be calling `ofSeq` on it. /// body is the body of a lambda which takes a parameter `elt`. /// {assertNotNull node}.AsArray() - /// |> Seq.cast /// |> Seq.map (fun elt -> {body}) /// |> {collectionType}.ofSeq let asArrayMapped @@ -92,13 +91,6 @@ module internal JsonParseGenerator = | None -> node | Some propertyName -> assertNotNull propertyName node |> SynExpr.callMethod "AsArray" - |> SynExpr.pipeThroughFunction ( - SynExpr.createLongIdent [ "Seq" ; "cast" ] - |> SynExpr.typeApp - [ - SynType.createLongIdent' [ "System" ; "Text" ; "Json" ; "Nodes" ; "JsonNode" ] - ] - ) |> SynExpr.pipeThroughFunction ( SynExpr.applyFunction (SynExpr.createLongIdent [ "Seq" ; "map" ]) (SynExpr.createLambda "elt" body) ) @@ -281,12 +273,10 @@ module internal JsonParseGenerator = ) |> SynExpr.pipeThroughFunction (SynExpr.createLongIdent [ "Map" ; "ofSeq" ]) | BigInt -> - AstHelper.raiseIfNull (Ident.create "v") - |> SynExpr.paren + node |> SynExpr.callMethod "ToJsonString" |> SynExpr.paren |> SynExpr.applyFunction (SynExpr.createLongIdent [ "System" ; "Numerics" ; "BigInteger" ; "Parse" ]) - |> SynExpr.createLet [ SynBinding.basic [ Ident.create "v" ] [] node ] | Measure (_measure, primType) -> parseNumberType options propertyName node primType |> SynExpr.pipeThroughFunction (Measure.getLanguagePrimitivesMeasure primType)