From 8405d5681f0e4ba2472a8e277b135f40b1c351a9 Mon Sep 17 00:00:00 2001 From: Nicko Guyer Date: Tue, 22 Feb 2022 10:58:54 -0500 Subject: [PATCH] Change query method to POST for custom contracts Signed-off-by: Nicko Guyer --- internal/oapiffi/ffi2swagger.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/oapiffi/ffi2swagger.go b/internal/oapiffi/ffi2swagger.go index 271b30e9bc..0c7969f785 100644 --- a/internal/oapiffi/ffi2swagger.go +++ b/internal/oapiffi/ffi2swagger.go @@ -70,7 +70,7 @@ func (og *ffiSwaggerGen) addMethod(routes []*oapispec.Route, method *fftypes.FFI routes = append(routes, &oapispec.Route{ Name: fmt.Sprintf("query_%s", method.Pathname), Path: fmt.Sprintf("query/%s", method.Pathname), // must match a route defined in apiserver routes! - Method: http.MethodGet, + Method: http.MethodPost, JSONOutputSchema: func(ctx context.Context) string { return ffiParamsJSONSchema(&method.Returns).String() }, JSONOutputCodes: []int{http.StatusOK}, })