From e8571553c417ced8c93051fe7c4d1279ca6bd49f Mon Sep 17 00:00:00 2001 From: Patrick Stevens <3138005+Smaug123@users.noreply.github.com> Date: Tue, 22 Apr 2025 22:53:32 +0100 Subject: [PATCH] Fix the incorrect rendering of the Patch attribute (#375) --- ConsumePlugin/Generated2SwaggerGitea.fs | 44 ++++++++++++------------- ConsumePlugin/GeneratedSwaggerGitea.fs | 44 ++++++++++++------------- README.md | 2 +- WoofWare.Myriad.Plugins/Swagger.fs | 2 +- 4 files changed, 46 insertions(+), 46 deletions(-) diff --git a/ConsumePlugin/Generated2SwaggerGitea.fs b/ConsumePlugin/Generated2SwaggerGitea.fs index 80b2ba3..5c537fb 100644 --- a/ConsumePlugin/Generated2SwaggerGitea.fs +++ b/ConsumePlugin/Generated2SwaggerGitea.fs @@ -41945,7 +41945,7 @@ module Gitea = let httpMessage = new System.Net.Http.HttpRequestMessage ( - Method = System.Net.Http.HttpMethod.Post, + Method = System.Net.Http.HttpMethod.Patch, RequestUri = uri ) @@ -42394,7 +42394,7 @@ module Gitea = let httpMessage = new System.Net.Http.HttpRequestMessage ( - Method = System.Net.Http.HttpMethod.Post, + Method = System.Net.Http.HttpMethod.Patch, RequestUri = uri ) @@ -43117,7 +43117,7 @@ module Gitea = let httpMessage = new System.Net.Http.HttpRequestMessage ( - Method = System.Net.Http.HttpMethod.Post, + Method = System.Net.Http.HttpMethod.Patch, RequestUri = uri ) @@ -43439,7 +43439,7 @@ module Gitea = let httpMessage = new System.Net.Http.HttpRequestMessage ( - Method = System.Net.Http.HttpMethod.Post, + Method = System.Net.Http.HttpMethod.Patch, RequestUri = uri ) @@ -43726,7 +43726,7 @@ module Gitea = let httpMessage = new System.Net.Http.HttpRequestMessage ( - Method = System.Net.Http.HttpMethod.Post, + Method = System.Net.Http.HttpMethod.Patch, RequestUri = uri ) @@ -44013,7 +44013,7 @@ module Gitea = let httpMessage = new System.Net.Http.HttpRequestMessage ( - Method = System.Net.Http.HttpMethod.Post, + Method = System.Net.Http.HttpMethod.Patch, RequestUri = uri ) @@ -45382,7 +45382,7 @@ module Gitea = let httpMessage = new System.Net.Http.HttpRequestMessage ( - Method = System.Net.Http.HttpMethod.Post, + Method = System.Net.Http.HttpMethod.Patch, RequestUri = uri ) @@ -45790,7 +45790,7 @@ module Gitea = let httpMessage = new System.Net.Http.HttpRequestMessage ( - Method = System.Net.Http.HttpMethod.Post, + Method = System.Net.Http.HttpMethod.Patch, RequestUri = uri ) @@ -47997,7 +47997,7 @@ module Gitea = let httpMessage = new System.Net.Http.HttpRequestMessage ( - Method = System.Net.Http.HttpMethod.Post, + Method = System.Net.Http.HttpMethod.Patch, RequestUri = uri ) @@ -48164,7 +48164,7 @@ module Gitea = let httpMessage = new System.Net.Http.HttpRequestMessage ( - Method = System.Net.Http.HttpMethod.Post, + Method = System.Net.Http.HttpMethod.Patch, RequestUri = uri ) @@ -48836,7 +48836,7 @@ module Gitea = let httpMessage = new System.Net.Http.HttpRequestMessage ( - Method = System.Net.Http.HttpMethod.Post, + Method = System.Net.Http.HttpMethod.Patch, RequestUri = uri ) @@ -49125,7 +49125,7 @@ module Gitea = let httpMessage = new System.Net.Http.HttpRequestMessage ( - Method = System.Net.Http.HttpMethod.Post, + Method = System.Net.Http.HttpMethod.Patch, RequestUri = uri ) @@ -49384,7 +49384,7 @@ module Gitea = let httpMessage = new System.Net.Http.HttpRequestMessage ( - Method = System.Net.Http.HttpMethod.Post, + Method = System.Net.Http.HttpMethod.Patch, RequestUri = uri ) @@ -51242,7 +51242,7 @@ module Gitea = let httpMessage = new System.Net.Http.HttpRequestMessage ( - Method = System.Net.Http.HttpMethod.Post, + Method = System.Net.Http.HttpMethod.Patch, RequestUri = uri ) @@ -51669,7 +51669,7 @@ module Gitea = let httpMessage = new System.Net.Http.HttpRequestMessage ( - Method = System.Net.Http.HttpMethod.Post, + Method = System.Net.Http.HttpMethod.Patch, RequestUri = uri ) @@ -52174,7 +52174,7 @@ module Gitea = let httpMessage = new System.Net.Http.HttpRequestMessage ( - Method = System.Net.Http.HttpMethod.Post, + Method = System.Net.Http.HttpMethod.Patch, RequestUri = uri ) @@ -54060,7 +54060,7 @@ module Gitea = let httpMessage = new System.Net.Http.HttpRequestMessage ( - Method = System.Net.Http.HttpMethod.Post, + Method = System.Net.Http.HttpMethod.Patch, RequestUri = uri ) @@ -54319,7 +54319,7 @@ module Gitea = let httpMessage = new System.Net.Http.HttpRequestMessage ( - Method = System.Net.Http.HttpMethod.Post, + Method = System.Net.Http.HttpMethod.Patch, RequestUri = uri ) @@ -56075,7 +56075,7 @@ module Gitea = let httpMessage = new System.Net.Http.HttpRequestMessage ( - Method = System.Net.Http.HttpMethod.Post, + Method = System.Net.Http.HttpMethod.Patch, RequestUri = uri ) @@ -56713,7 +56713,7 @@ module Gitea = let httpMessage = new System.Net.Http.HttpRequestMessage ( - Method = System.Net.Http.HttpMethod.Post, + Method = System.Net.Http.HttpMethod.Patch, RequestUri = uri ) @@ -57524,7 +57524,7 @@ module Gitea = let httpMessage = new System.Net.Http.HttpRequestMessage ( - Method = System.Net.Http.HttpMethod.Post, + Method = System.Net.Http.HttpMethod.Patch, RequestUri = uri ) @@ -58531,7 +58531,7 @@ module Gitea = let httpMessage = new System.Net.Http.HttpRequestMessage ( - Method = System.Net.Http.HttpMethod.Post, + Method = System.Net.Http.HttpMethod.Patch, RequestUri = uri ) diff --git a/ConsumePlugin/GeneratedSwaggerGitea.fs b/ConsumePlugin/GeneratedSwaggerGitea.fs index 2f2d0b1..c7f7305 100644 --- a/ConsumePlugin/GeneratedSwaggerGitea.fs +++ b/ConsumePlugin/GeneratedSwaggerGitea.fs @@ -3423,7 +3423,7 @@ type IGitea = [] id : int * ?ct : System.Threading.CancellationToken -> Hook System.Threading.Tasks.Task /// Update a hook - [] + [] [] abstract AdminEditHook : [] id : int * @@ -3494,7 +3494,7 @@ type IGitea = unit System.Threading.Tasks.Task /// Edit an existing user - [] + [] [] abstract AdminEditUser : [] username : string * @@ -3601,7 +3601,7 @@ type IGitea = NotificationThread System.Threading.Tasks.Task /// Mark notification thread as read by ID - [] + [] [] abstract NotifyReadThread : [] id : string * @@ -3649,7 +3649,7 @@ type IGitea = unit System.Threading.Tasks.Task /// Edit an organization - [] + [] [] abstract OrgEdit : [] org : string * @@ -3695,7 +3695,7 @@ type IGitea = unit System.Threading.Tasks.Task /// Update a hook - [] + [] [] abstract OrgEditHook : [] org : string * @@ -3742,7 +3742,7 @@ type IGitea = unit System.Threading.Tasks.Task /// Update a label - [] + [] [] abstract OrgEditLabel : [] org : string * @@ -3984,7 +3984,7 @@ type IGitea = unit System.Threading.Tasks.Task /// Edit a repository's properties. Only fields that are set will be changed. - [] + [] [] abstract RepoEdit : [] owner : string * @@ -4052,7 +4052,7 @@ type IGitea = unit System.Threading.Tasks.Task /// Edit a branch protections for a repository. Only fields that are set will be changed - [] + [] [] abstract RepoEditBranchProtection : [] owner : string * @@ -4425,7 +4425,7 @@ type IGitea = unit System.Threading.Tasks.Task /// Edit a Git hook in a repository - [] + [] [] abstract RepoEditGitHook : [] owner : string * @@ -4456,7 +4456,7 @@ type IGitea = unit System.Threading.Tasks.Task /// Edit a hook in a repository - [] + [] [] abstract RepoEditHook : [] owner : string * @@ -4573,7 +4573,7 @@ type IGitea = unit System.Threading.Tasks.Task /// Edit a comment attachment - [] + [] [] abstract IssueEditIssueCommentAttachment : [] owner : string * @@ -4626,7 +4626,7 @@ type IGitea = unit System.Threading.Tasks.Task /// Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. - [] + [] [] abstract IssueEditIssue : [] owner : string * @@ -4669,7 +4669,7 @@ type IGitea = unit System.Threading.Tasks.Task /// Edit an issue attachment - [] + [] [] abstract IssueEditIssueAttachment : [] owner : string * @@ -4999,7 +4999,7 @@ type IGitea = unit System.Threading.Tasks.Task /// Update a label - [] + [] [] abstract IssueEditLabel : [] owner : string * @@ -5073,7 +5073,7 @@ type IGitea = unit System.Threading.Tasks.Task /// Update a milestone - [] + [] [] abstract IssueEditMilestone : [] owner : string * @@ -5157,7 +5157,7 @@ type IGitea = PullRequest System.Threading.Tasks.Task /// Update a pull request. If using deadline only the date will be taken into account, and time of day ignored. - [] + [] [] abstract RepoEditPullRequest : [] owner : string * @@ -5495,7 +5495,7 @@ type IGitea = unit System.Threading.Tasks.Task /// Update a release - [] + [] [] abstract RepoEditRelease : [] owner : string * @@ -5538,7 +5538,7 @@ type IGitea = unit System.Threading.Tasks.Task /// Edit a release attachment - [] + [] [] abstract RepoEditReleaseAttachment : [] owner : string * @@ -5845,7 +5845,7 @@ type IGitea = unit System.Threading.Tasks.Task /// Edit a wiki page - [] + [] [] abstract RepoEditWikiPage : [] owner : string * @@ -5936,7 +5936,7 @@ type IGitea = [] id : int * ?ct : System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Edit a team - [] + [] [] abstract OrgEditTeam : [] id : int * @@ -6066,7 +6066,7 @@ type IGitea = [] id : int * ?ct : System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// update an OAuth2 Application, this includes regenerating the client secret - [] + [] [] abstract UserUpdateOAuth2Application : [] id : int * @@ -6204,7 +6204,7 @@ type IGitea = abstract GetUserSettings : ?ct : System.Threading.CancellationToken -> UserSettings list System.Threading.Tasks.Task /// Update user settings - [] + [] [] abstract UpdateUserSettings : [] body : UserSettingsOptions * ?ct : System.Threading.CancellationToken -> diff --git a/README.md b/README.md index 9c8139e..9058354 100644 --- a/README.md +++ b/README.md @@ -136,7 +136,7 @@ module InnerTypeWithBoth = ret.Add (key.ToString (), System.Text.Json.Nodes.JsonValue.Create value) ret - ) input.Map + ) input.ReadOnlyDict ) node diff --git a/WoofWare.Myriad.Plugins/Swagger.fs b/WoofWare.Myriad.Plugins/Swagger.fs index 5369a7b..fb1f26e 100644 --- a/WoofWare.Myriad.Plugins/Swagger.fs +++ b/WoofWare.Myriad.Plugins/Swagger.fs @@ -472,7 +472,7 @@ type HttpMethod = | HttpMethod.Get -> "Get" | HttpMethod.Post -> "Post" | HttpMethod.Delete -> "Delete" - | HttpMethod.Patch -> "Post" + | HttpMethod.Patch -> "Patch" | HttpMethod.Options -> "Options" | HttpMethod.Head -> "Head" | HttpMethod.Put -> "Put"