diff --git a/ConsumePlugin/ConsumePlugin.fsproj b/ConsumePlugin/ConsumePlugin.fsproj index 7d053e9..6c73f39 100644 --- a/ConsumePlugin/ConsumePlugin.fsproj +++ b/ConsumePlugin/ConsumePlugin.fsproj @@ -11,6 +11,10 @@ + + + JsonParseNullness.fs + diff --git a/ConsumePlugin/Generated2SwaggerGitea.fs b/ConsumePlugin/Generated2SwaggerGitea.fs index 5c2fc5b..fc1b4e5 100644 --- a/ConsumePlugin/Generated2SwaggerGitea.fs +++ b/ConsumePlugin/Generated2SwaggerGitea.fs @@ -14652,6 +14652,7 @@ module AccessTokenJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -14959,6 +14960,7 @@ module BranchProtectionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -14983,6 +14985,7 @@ module BranchProtectionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -14992,6 +14995,7 @@ module BranchProtectionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -15011,6 +15015,7 @@ module BranchProtectionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -15020,6 +15025,7 @@ module BranchProtectionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -15084,6 +15090,7 @@ module BranchProtectionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -15093,6 +15100,7 @@ module BranchProtectionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -15478,6 +15486,7 @@ module CreateAccessTokenOptionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -15533,6 +15542,7 @@ module CreateBranchProtectionOptionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -15557,6 +15567,7 @@ module CreateBranchProtectionOptionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -15566,6 +15577,7 @@ module CreateBranchProtectionOptionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -15585,6 +15597,7 @@ module CreateBranchProtectionOptionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -15594,6 +15607,7 @@ module CreateBranchProtectionOptionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -15653,6 +15667,7 @@ module CreateBranchProtectionOptionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -15662,6 +15677,7 @@ module CreateBranchProtectionOptionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -15791,6 +15807,7 @@ module CreateEmailOptionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -16006,6 +16023,7 @@ module CreateIssueOptionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -16030,6 +16048,7 @@ module CreateIssueOptionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -16265,6 +16284,7 @@ module CreateOAuth2ApplicationOptionsJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -16408,6 +16428,7 @@ module CreatePullRequestOptionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -16437,6 +16458,7 @@ module CreatePullRequestOptionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -16945,6 +16967,7 @@ module CreateTeamOptionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -17262,6 +17285,7 @@ module DeleteEmailOptionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -17370,6 +17394,7 @@ module EditBranchProtectionOptionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -17389,6 +17414,7 @@ module EditBranchProtectionOptionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -17398,6 +17424,7 @@ module EditBranchProtectionOptionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -17417,6 +17444,7 @@ module EditBranchProtectionOptionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -17426,6 +17454,7 @@ module EditBranchProtectionOptionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -17480,6 +17509,7 @@ module EditBranchProtectionOptionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -17489,6 +17519,7 @@ module EditBranchProtectionOptionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -17675,6 +17706,7 @@ module EditHookOptionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -17814,6 +17846,7 @@ module EditIssueOptionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -18066,6 +18099,7 @@ module EditPullRequestOptionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -18090,6 +18124,7 @@ module EditPullRequestOptionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -18301,6 +18336,7 @@ module EditTeamOptionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -18701,6 +18737,7 @@ module FileCommitResponseJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> CommitMeta.jsonParse elt) |> List.ofSeq |> Some @@ -19052,6 +19089,7 @@ module GeneralUISettingsJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -19061,6 +19099,7 @@ module GeneralUISettingsJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -19452,6 +19491,7 @@ module GitTreeResponseJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> GitEntry.jsonParse elt) |> List.ofSeq |> Some @@ -19568,6 +19608,7 @@ module HookJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -19806,6 +19847,7 @@ module IssueLabelsOptionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -20258,6 +20300,7 @@ module NodeInfoServicesJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -20267,6 +20310,7 @@ module NodeInfoServicesJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -20431,6 +20475,7 @@ module OAuth2ApplicationJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -20879,6 +20924,7 @@ module PullReviewRequestOptionsJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -20888,6 +20934,7 @@ module PullReviewRequestOptionsJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -21055,6 +21102,7 @@ module RepoTopicOptionsJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -21398,6 +21446,7 @@ module TeamJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -21488,6 +21537,7 @@ module TopicNameJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -21585,6 +21635,7 @@ module TransferRepoOptionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -22262,6 +22313,7 @@ module WikiCommitListJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> WikiCommit.jsonParse elt) |> List.ofSeq |> Some @@ -22485,6 +22537,7 @@ module CommentJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> Attachment.jsonParse elt) |> List.ofSeq |> Some @@ -22871,6 +22924,7 @@ module CreateHookOptionJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -22957,6 +23011,7 @@ module CreatePullReviewOptionsJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> CreatePullReviewComment.jsonParse elt) |> List.ofSeq |> Some @@ -23376,6 +23431,7 @@ module IssueTemplateJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -23395,6 +23451,7 @@ module IssueTemplateJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> IssueFormField.jsonParse elt) |> List.ofSeq |> Some @@ -24201,6 +24258,7 @@ module ReleaseJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> Attachment.jsonParse elt) |> List.ofSeq |> Some @@ -24381,7 +24439,12 @@ module RepoTransferJsonParseExtension = let arg_3 = match node.["teams"] with | null -> None - | v -> v.AsArray () |> Seq.map (fun elt -> Team.jsonParse elt) |> List.ofSeq |> Some + | v -> + v.AsArray () + |> Seq.cast + |> Seq.map (fun elt -> Team.jsonParse elt) + |> List.ofSeq + |> Some let arg_2 = match node.["recipient"] with @@ -24825,6 +24888,7 @@ module SearchResultsJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> Repository.jsonParse elt) |> List.ofSeq |> Some @@ -24950,6 +25014,7 @@ module CombinedStatusJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> CommitStatus.jsonParse elt) |> List.ofSeq |> Some @@ -25036,6 +25101,7 @@ module CommitJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> CommitMeta.jsonParse elt) |> List.ofSeq |> Some @@ -25050,6 +25116,7 @@ module CommitJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> CommitAffectedFiles.jsonParse elt) |> List.ofSeq |> Some @@ -25366,7 +25433,12 @@ module IssueJsonParseExtension = let arg_12 = match node.["labels"] with | null -> None - | v -> v.AsArray () |> Seq.map (fun elt -> Label.jsonParse elt) |> List.ofSeq |> Some + | v -> + v.AsArray () + |> Seq.cast + |> Seq.map (fun elt -> Label.jsonParse elt) + |> List.ofSeq + |> Some let arg_11 = match node.["is_locked"] with @@ -25411,7 +25483,12 @@ module IssueJsonParseExtension = let arg_3 = match node.["assignees"] with | null -> None - | v -> v.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq |> Some + | v -> + v.AsArray () + |> Seq.cast + |> Seq.map (fun elt -> User.jsonParse elt) + |> List.ofSeq + |> Some let arg_2 = match node.["assignee"] with @@ -25423,6 +25500,7 @@ module IssueJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> Attachment.jsonParse elt) |> List.ofSeq |> Some @@ -25528,6 +25606,7 @@ module NodeInfoJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -25861,6 +25940,7 @@ module PayloadCommitJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -25870,6 +25950,7 @@ module PayloadCommitJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -25899,6 +25980,7 @@ module PayloadCommitJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -26024,7 +26106,12 @@ module PullRequestJsonParseExtension = let arg_15 = match node.["labels"] with | null -> None - | v -> v.AsArray () |> Seq.map (fun elt -> Label.jsonParse elt) |> List.ofSeq |> Some + | v -> + v.AsArray () + |> Seq.cast + |> Seq.map (fun elt -> Label.jsonParse elt) + |> List.ofSeq + |> Some let arg_14 = match node.["is_locked"] with @@ -26084,7 +26171,12 @@ module PullRequestJsonParseExtension = let arg_3 = match node.["assignees"] with | null -> None - | v -> v.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq |> Some + | v -> + v.AsArray () + |> Seq.cast + |> Seq.map (fun elt -> User.jsonParse elt) + |> List.ofSeq + |> Some let arg_2 = match node.["assignee"] with @@ -26274,6 +26366,7 @@ module BranchJsonParseExtension = | null -> None | v -> v.AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq |> Some @@ -26662,6 +26755,11 @@ 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)) @@ -26746,7 +26844,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Cron.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -26829,7 +26936,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Hook.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -26878,6 +26994,11 @@ 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)) @@ -26920,6 +27041,11 @@ 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)) @@ -26972,6 +27098,11 @@ 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)) @@ -27019,8 +27150,14 @@ 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 } @@ -27076,8 +27213,14 @@ 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 } @@ -27206,7 +27349,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -27255,6 +27407,11 @@ 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)) @@ -27353,6 +27510,11 @@ 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)) @@ -27408,6 +27570,11 @@ 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)) @@ -27503,6 +27670,11 @@ 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)) @@ -27558,6 +27730,11 @@ 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)) @@ -27713,6 +27890,11 @@ 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)) @@ -27781,8 +27963,14 @@ 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 } @@ -27843,8 +28031,14 @@ 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 } @@ -27885,6 +28079,11 @@ 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)) @@ -27928,6 +28127,11 @@ 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)) @@ -27979,6 +28183,11 @@ 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)) @@ -28033,6 +28242,11 @@ 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)) @@ -28080,8 +28294,14 @@ 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 } @@ -28132,6 +28352,11 @@ 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)) @@ -28174,6 +28399,11 @@ 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)) @@ -28262,6 +28492,11 @@ 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)) @@ -28314,7 +28549,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Hook.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -28368,6 +28612,11 @@ 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)) @@ -28412,6 +28661,11 @@ 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)) @@ -28506,6 +28760,11 @@ 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)) @@ -28558,7 +28817,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Label.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -28612,6 +28880,11 @@ 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)) @@ -28656,6 +28929,11 @@ 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)) @@ -28750,6 +29028,11 @@ 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)) @@ -28802,7 +29085,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -28931,7 +29223,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -29103,8 +29404,14 @@ 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 } @@ -29160,6 +29467,11 @@ 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)) @@ -29212,7 +29524,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Team.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -29266,6 +29587,11 @@ 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)) @@ -29388,7 +29714,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Package.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -29442,6 +29777,11 @@ 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)) @@ -29544,8 +29884,14 @@ 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 } @@ -29645,7 +29991,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Issue.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -29694,6 +30049,11 @@ 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)) @@ -29792,6 +30152,11 @@ 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)) @@ -29836,6 +30201,11 @@ 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)) @@ -29930,6 +30300,11 @@ 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)) @@ -30015,7 +30390,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -30061,8 +30445,14 @@ 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 } @@ -30125,6 +30515,11 @@ 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)) @@ -30172,6 +30567,11 @@ 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)) @@ -30276,6 +30676,11 @@ 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)) @@ -30330,7 +30735,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Branch.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -30391,6 +30805,11 @@ 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)) @@ -30438,6 +30857,11 @@ 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)) @@ -30533,7 +30957,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -30719,6 +31152,11 @@ 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)) @@ -30788,7 +31226,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Commit.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -30850,6 +31297,11 @@ 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)) @@ -30918,8 +31370,14 @@ 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 } @@ -30973,8 +31431,14 @@ 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 } @@ -31035,6 +31499,11 @@ 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)) @@ -31098,6 +31567,11 @@ 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)) @@ -31161,6 +31635,11 @@ 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)) @@ -31224,6 +31703,11 @@ 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)) @@ -31280,6 +31764,11 @@ 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)) @@ -31387,8 +31876,14 @@ 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 } @@ -31446,6 +31941,11 @@ 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)) @@ -31493,6 +31993,11 @@ 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)) @@ -31540,6 +32045,11 @@ 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)) @@ -31636,6 +32146,11 @@ 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)) @@ -31682,8 +32197,14 @@ 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 } @@ -31732,8 +32253,14 @@ 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 } @@ -31782,6 +32309,11 @@ 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)) @@ -31847,6 +32379,11 @@ 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)) @@ -31901,7 +32438,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Hook.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -31957,6 +32503,11 @@ 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)) @@ -32001,7 +32552,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> GitHook.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -32048,6 +32608,11 @@ 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)) @@ -32152,6 +32717,11 @@ 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)) @@ -32199,6 +32769,11 @@ 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)) @@ -32303,6 +32878,11 @@ 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)) @@ -32396,8 +32976,14 @@ 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 } @@ -32489,7 +33075,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Issue.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -32545,6 +33140,11 @@ 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)) @@ -32611,7 +33211,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Comment.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -32699,8 +33308,14 @@ 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 } @@ -32759,6 +33374,11 @@ 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)) @@ -32878,6 +33498,11 @@ 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)) @@ -32925,7 +33550,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Reaction.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -33029,6 +33663,11 @@ 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)) @@ -33133,6 +33772,11 @@ 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)) @@ -33180,8 +33824,14 @@ 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 } @@ -33240,6 +33890,11 @@ 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)) @@ -33359,6 +34014,11 @@ 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)) @@ -33421,7 +34081,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Comment.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -33484,6 +34153,11 @@ 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)) @@ -33589,6 +34263,11 @@ 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)) @@ -33636,7 +34315,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Label.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -33699,7 +34387,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Label.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -33803,7 +34500,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Label.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -33907,7 +34613,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Reaction.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -34149,7 +34864,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -34196,6 +34920,11 @@ 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)) @@ -34264,8 +34993,14 @@ 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 } @@ -34338,8 +35073,14 @@ 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 } @@ -34404,6 +35145,11 @@ 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)) @@ -34553,8 +35299,14 @@ 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 } @@ -34612,6 +35364,11 @@ 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)) @@ -34659,6 +35416,11 @@ 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)) @@ -34754,7 +35516,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Label.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -34810,6 +35581,11 @@ 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)) @@ -34857,6 +35633,11 @@ 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)) @@ -34961,6 +35742,11 @@ 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)) @@ -35005,6 +35791,11 @@ 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)) @@ -35124,8 +35915,14 @@ 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 } @@ -35188,6 +35985,11 @@ 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)) @@ -35235,6 +36037,11 @@ 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)) @@ -35339,6 +36146,11 @@ 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)) @@ -35452,8 +36264,14 @@ 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 } @@ -35521,8 +36339,14 @@ 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 } @@ -35596,8 +36420,14 @@ 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 } @@ -35660,6 +36490,11 @@ 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)) @@ -35707,6 +36542,11 @@ 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)) @@ -35770,6 +36610,11 @@ 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)) @@ -35888,7 +36733,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Commit.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -35956,8 +36810,14 @@ 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 } @@ -36161,8 +37021,14 @@ 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 } @@ -36283,8 +37149,14 @@ 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 } @@ -36349,6 +37221,11 @@ 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)) @@ -36397,6 +37274,11 @@ 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)) @@ -36462,6 +37344,11 @@ 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)) @@ -36552,8 +37439,14 @@ 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 } @@ -36620,6 +37513,11 @@ 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)) @@ -36668,6 +37566,11 @@ 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)) @@ -36775,8 +37678,14 @@ 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 } @@ -36839,6 +37748,11 @@ 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)) @@ -36926,6 +37840,11 @@ 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)) @@ -37089,7 +38008,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Release.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -37150,6 +38078,11 @@ 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)) @@ -37196,6 +38129,11 @@ 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)) @@ -37243,6 +38181,11 @@ 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)) @@ -37331,6 +38274,11 @@ 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)) @@ -37435,6 +38383,11 @@ 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)) @@ -37482,8 +38435,14 @@ 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 } @@ -37542,6 +38501,11 @@ 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)) @@ -37661,6 +38625,11 @@ 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)) @@ -37705,7 +38674,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -37797,7 +38775,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -37865,8 +38852,14 @@ 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 } @@ -37931,6 +38924,11 @@ 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)) @@ -37985,7 +38983,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -38031,6 +39038,11 @@ 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)) @@ -38117,6 +39129,11 @@ 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)) @@ -38171,7 +39188,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Tag.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -38227,6 +39253,11 @@ 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)) @@ -38274,6 +39305,11 @@ 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)) @@ -38359,7 +39395,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Team.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -38406,6 +39451,11 @@ 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)) @@ -38557,8 +39607,14 @@ 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 } @@ -38607,8 +39663,14 @@ 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 } @@ -38664,6 +39726,11 @@ 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)) @@ -38857,6 +39924,11 @@ 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)) @@ -38903,6 +39975,11 @@ 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)) @@ -38949,6 +40026,11 @@ 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)) @@ -39010,6 +40092,11 @@ 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)) @@ -39057,6 +40144,11 @@ 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)) @@ -39161,6 +40253,11 @@ 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)) @@ -39215,8 +40312,14 @@ 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 } @@ -39277,6 +40380,11 @@ 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)) @@ -39344,6 +40452,11 @@ 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)) @@ -39386,6 +40499,11 @@ 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)) @@ -39425,6 +40543,11 @@ 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)) @@ -39464,6 +40587,11 @@ 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)) @@ -39503,6 +40631,11 @@ 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)) @@ -39542,6 +40675,11 @@ 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)) @@ -39617,6 +40755,11 @@ 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)) @@ -39705,6 +40848,11 @@ 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)) @@ -39757,7 +40905,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -39801,6 +40958,11 @@ 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)) @@ -39929,8 +41091,14 @@ 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 } @@ -39979,6 +41147,11 @@ 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)) @@ -40110,8 +41283,14 @@ 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 } @@ -40152,6 +41331,11 @@ 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)) @@ -40204,8 +41388,14 @@ 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 } @@ -40258,6 +41448,11 @@ 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)) @@ -40301,6 +41496,11 @@ 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)) @@ -40393,6 +41593,11 @@ 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)) @@ -40432,7 +41637,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Email.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -40481,7 +41695,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Email.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -40573,7 +41796,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -40622,7 +41854,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -40854,8 +42095,14 @@ 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 } @@ -40906,6 +42153,11 @@ 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)) @@ -40948,6 +42200,11 @@ 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)) @@ -41031,8 +42288,14 @@ 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 } @@ -41081,8 +42344,14 @@ 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 } @@ -41133,6 +42402,11 @@ 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)) @@ -41172,8 +42446,14 @@ 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 } @@ -41224,8 +42504,14 @@ 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 } @@ -41274,8 +42560,14 @@ 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 } @@ -41447,8 +42739,14 @@ 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 } @@ -41502,8 +42800,14 @@ 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 } @@ -41552,7 +42856,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Team.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -41611,8 +42924,14 @@ 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 } @@ -41704,6 +43023,11 @@ 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)) @@ -41757,7 +43081,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -41810,7 +43143,16 @@ module Gitea = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -41893,8 +43235,14 @@ 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 } @@ -41957,8 +43305,14 @@ 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 } @@ -42013,8 +43367,14 @@ 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 } @@ -42062,6 +43422,11 @@ 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)) @@ -42115,8 +43480,14 @@ 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 } @@ -42171,8 +43542,14 @@ 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 } @@ -42227,8 +43604,14 @@ 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 } @@ -42283,8 +43666,14 @@ 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 } @@ -42341,6 +43730,11 @@ 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)) @@ -42420,6 +43814,11 @@ 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 956fb22..d8e510c 100644 --- a/ConsumePlugin/GeneratedJson.fs +++ b/ConsumePlugin/GeneratedJson.fs @@ -71,6 +71,7 @@ module JsonRecordType = ) | v -> v) .AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> Array.ofSeq @@ -84,6 +85,7 @@ module JsonRecordType = ) | v -> v) .AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> Array.ofSeq @@ -109,6 +111,7 @@ module JsonRecordType = ) | v -> v) .AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq @@ -201,7 +204,15 @@ module ToGetExtensionMethodJsonParseExtension = /// Parse from a JSON node. static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : ToGetExtensionMethod = - let arg_20 = System.Numerics.BigInteger.Parse (node.["whiskey"].ToJsonString ()) + let arg_20 = + let v = node.["whiskey"] + + System.Numerics.BigInteger.Parse ( + (match v with + | null -> raise (System.ArgumentNullException ()) + | v -> v) + .ToJsonString () + ) let arg_19 = (match node.["victor"] with diff --git a/ConsumePlugin/GeneratedJsonParseNullness.fs b/ConsumePlugin/GeneratedJsonParseNullness.fs new file mode 100644 index 0000000..8f6df28 --- /dev/null +++ b/ConsumePlugin/GeneratedJsonParseNullness.fs @@ -0,0 +1,53 @@ +//------------------------------------------------------------------------------ +// 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 4930adb..81e671b 100644 --- a/ConsumePlugin/GeneratedPureGymDto.fs +++ b/ConsumePlugin/GeneratedPureGymDto.fs @@ -60,6 +60,7 @@ module GymOpeningHours = ) | v -> v) .AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq @@ -1038,6 +1039,7 @@ 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 d1408ad..a83080d 100644 --- a/ConsumePlugin/GeneratedRestClient.fs +++ b/ConsumePlugin/GeneratedRestClient.fs @@ -48,7 +48,16 @@ module PureGymApi = System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Gym.jsonParse elt) |> List.ofSeq + 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 } |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) @@ -82,6 +91,11 @@ 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)) @@ -116,6 +130,11 @@ 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)) @@ -146,6 +165,11 @@ 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)) @@ -179,6 +203,11 @@ 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)) @@ -209,6 +238,11 @@ 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)) @@ -239,6 +273,11 @@ 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)) @@ -294,6 +333,11 @@ 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 @@ -346,6 +390,11 @@ 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)) @@ -387,6 +436,11 @@ 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)) @@ -878,6 +932,11 @@ 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, @@ -914,6 +973,11 @@ 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, @@ -950,6 +1014,11 @@ 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, @@ -986,6 +1055,11 @@ 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 7a1d8c5..f5c6ed4 100644 --- a/ConsumePlugin/GeneratedSerde.fs +++ b/ConsumePlugin/GeneratedSerde.fs @@ -408,6 +408,7 @@ module InnerTypeWithBothJsonParseExtension = let value = (kvp.Value).AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq @@ -676,6 +677,7 @@ module JsonRecordTypeWithBothJsonParseExtension = ) | v -> v) .AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> Array.ofSeq @@ -689,6 +691,7 @@ module JsonRecordTypeWithBothJsonParseExtension = ) | v -> v) .AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> Array.ofSeq @@ -714,6 +717,7 @@ 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 14fec62..9e7d318 100644 --- a/ConsumePlugin/GeneratedVault.fs +++ b/ConsumePlugin/GeneratedVault.fs @@ -94,6 +94,7 @@ module JwtVaultAuthResponse = ) | v -> v) .AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq @@ -107,6 +108,7 @@ module JwtVaultAuthResponse = ) | v -> v) .AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq @@ -120,6 +122,7 @@ module JwtVaultAuthResponse = ) | v -> v) .AsArray () + |> Seq.cast |> Seq.map (fun elt -> elt.AsValue().GetValue ()) |> List.ofSeq @@ -496,6 +499,11 @@ 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)) @@ -532,6 +540,11 @@ 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)) @@ -590,6 +603,11 @@ 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)) @@ -626,6 +644,11 @@ 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)) @@ -687,6 +710,11 @@ 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)) @@ -723,6 +751,11 @@ 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 new file mode 100644 index 0000000..b4c1761 --- /dev/null +++ b/ConsumePlugin/JsonParseNullness.fs @@ -0,0 +1,13 @@ +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 new file mode 100644 index 0000000..b827701 --- /dev/null +++ b/WoofWare.Myriad.Plugins.Test/TestJsonParse/TestJsonNullability.fs @@ -0,0 +1,23 @@ +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 c8f6a61..daa7d16 100644 --- a/WoofWare.Myriad.Plugins.Test/WoofWare.Myriad.Plugins.Test.fsproj +++ b/WoofWare.Myriad.Plugins.Test/WoofWare.Myriad.Plugins.Test.fsproj @@ -18,6 +18,7 @@ + diff --git a/WoofWare.Myriad.Plugins/AstHelper.fs b/WoofWare.Myriad.Plugins/AstHelper.fs index d168672..0f4423e 100644 --- a/WoofWare.Myriad.Plugins/AstHelper.fs +++ b/WoofWare.Myriad.Plugins/AstHelper.fs @@ -356,3 +356,19 @@ 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 11aafbc..a7539c7 100644 --- a/WoofWare.Myriad.Plugins/HttpClientGenerator.fs +++ b/WoofWare.Myriad.Plugins/HttpClientGenerator.fs @@ -1,6 +1,5 @@ namespace WoofWare.Myriad.Plugins -open System.IO open System.Net.Http open Fantomas.FCS.Syntax open WoofWare.Whippet.Fantomas @@ -14,17 +13,6 @@ 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 @@ -568,6 +556,9 @@ module internal HttpClientGenerator = ) ) + let jsonNodeNotNull = + Let ("jsonNode", AstHelper.raiseIfNull (Ident.create "jsonNode")) + let setVariableHeaders = variableHeaders |> List.map (fun (headerName, callToGetValue) -> @@ -642,6 +633,7 @@ module internal HttpClientGenerator = yield responseString yield responseStream yield jsonNode + yield jsonNodeNotNull | String -> yield responseString | Stream -> yield responseStream | UnitType -> @@ -650,6 +642,7 @@ module internal HttpClientGenerator = | _ -> yield responseStream yield jsonNode + yield jsonNodeNotNull ] |> SynExpr.createCompExpr "async" returnExpr |> SynExpr.startAsTask cancellationTokenArg @@ -914,10 +907,6 @@ 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 173c5f8..333ed7d 100644 --- a/WoofWare.Myriad.Plugins/JsonParseGenerator.fs +++ b/WoofWare.Myriad.Plugins/JsonParseGenerator.fs @@ -78,6 +78,7 @@ 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 @@ -91,6 +92,13 @@ 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) ) @@ -273,10 +281,12 @@ module internal JsonParseGenerator = ) |> SynExpr.pipeThroughFunction (SynExpr.createLongIdent [ "Map" ; "ofSeq" ]) | BigInt -> - node + AstHelper.raiseIfNull (Ident.create "v") + |> SynExpr.paren |> 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)