From d3eca47c6ac212c37466f322138ff7b3b719b0d3 Mon Sep 17 00:00:00 2001 From: Olivier Bellone Date: Mon, 15 Jul 2024 12:15:26 -0700 Subject: [PATCH] Add missing `extend`s to `PrivateAPIInstance` --- lib/tapioca/dsl/compilers/grape_endpoints.rb | 2 ++ spec/tapioca/dsl/compilers/grape_endpoints_spec.rb | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/lib/tapioca/dsl/compilers/grape_endpoints.rb b/lib/tapioca/dsl/compilers/grape_endpoints.rb index b3a0fd5..7ea1526 100644 --- a/lib/tapioca/dsl/compilers/grape_endpoints.rb +++ b/lib/tapioca/dsl/compilers/grape_endpoints.rb @@ -140,6 +140,8 @@ def create_api_class superclass = "::Grape::API::Instance" api.create_class(APIInstanceClassName, superclass_name: superclass) do |klass| + klass.create_extend(CallbacksMethodsModuleName) + klass.create_extend(RequestResponseMethodsModuleName) klass.create_extend(RoutingMethodsModuleName) end end diff --git a/spec/tapioca/dsl/compilers/grape_endpoints_spec.rb b/spec/tapioca/dsl/compilers/grape_endpoints_spec.rb index 98fd914..76bdfc9 100644 --- a/spec/tapioca/dsl/compilers/grape_endpoints_spec.rb +++ b/spec/tapioca/dsl/compilers/grape_endpoints_spec.rb @@ -117,6 +117,8 @@ def route_param(param, options = {}, &block); end end class PrivateAPIInstance < ::Grape::API::Instance + extend GeneratedCallbacksMethods + extend GeneratedRequestResponseMethods extend GeneratedRoutingMethods end @@ -210,6 +212,8 @@ def route_param(param, options = {}, &block); end end class PrivateAPIInstance < ::Grape::API::Instance + extend GeneratedCallbacksMethods + extend GeneratedRequestResponseMethods extend GeneratedRoutingMethods end