From 2cd9b7dd58daec29dff6ef0210d44999d4ade3fc Mon Sep 17 00:00:00 2001 From: Xavier Thomas Date: Thu, 17 Apr 2025 18:29:54 +0200 Subject: [PATCH 1/2] fix addScope when name is missing in map --- src/oatpp-swagger/Model.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/oatpp-swagger/Model.hpp b/src/oatpp-swagger/Model.hpp index 543936d..99fa3bd 100644 --- a/src/oatpp-swagger/Model.hpp +++ b/src/oatpp-swagger/Model.hpp @@ -577,7 +577,8 @@ class DocumentInfo { * @return */ OAuthFlowBuilder& addScope(const String& name, const String& scope){ - getScopes()->at(name) = scope; + //getScopes()->at(name) = scope; + m_scopes->operator[](name) = scope; return *this; } From 6dd027636994868a086e721eef8a5754cd5546f4 Mon Sep 17 00:00:00 2001 From: Xavier Thomas Date: Fri, 18 Apr 2025 15:53:40 +0200 Subject: [PATCH 2/2] replace m_scopes to getScopes() --- src/oatpp-swagger/Model.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/oatpp-swagger/Model.hpp b/src/oatpp-swagger/Model.hpp index 99fa3bd..e56bdb5 100644 --- a/src/oatpp-swagger/Model.hpp +++ b/src/oatpp-swagger/Model.hpp @@ -578,7 +578,7 @@ class DocumentInfo { */ OAuthFlowBuilder& addScope(const String& name, const String& scope){ //getScopes()->at(name) = scope; - m_scopes->operator[](name) = scope; + getScopes()->operator[](name) = scope; return *this; }