From add313f61a6fcad2918c80b6e231b5e37bff1887 Mon Sep 17 00:00:00 2001 From: Lehp <40690143+Lehp@users.noreply.github.com> Date: Thu, 10 Mar 2022 14:27:32 +0100 Subject: [PATCH] doc: security or documentation (#1158) --- testdata/simple/api/api.go | 1 + testdata/simple/expected.json | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/testdata/simple/api/api.go b/testdata/simple/api/api.go index e766c35f9..34e843713 100644 --- a/testdata/simple/api/api.go +++ b/testdata/simple/api/api.go @@ -41,6 +41,7 @@ func GetStringByInt(w http.ResponseWriter, r *http.Request) { // @Security OAuth2Implicit[read, admin] // @Security OAuth2AccessCode[read] // @Security OAuth2Password[admin] +// @Security OAuth2Implicit[read, write] || Firebase // @Router /testapi/get-struct-array-by-string/{some_id} [get] func GetStructArrayByString(w http.ResponseWriter, r *http.Request) { //write your code diff --git a/testdata/simple/expected.json b/testdata/simple/expected.json index dbe9b6b62..159eee394 100644 --- a/testdata/simple/expected.json +++ b/testdata/simple/expected.json @@ -299,6 +299,13 @@ "OAuth2Password": [ "admin" ] + }, + { + "Firebase": [], + "OAuth2Implicit": [ + "read", + "write" + ] } ], "description": "get struct array by ID",