-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
96 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,18 @@ | ||
package global_security | ||
|
||
import ( | ||
"net/http" | ||
|
||
"github.com/swaggo/swag/testdata/global_security/api" | ||
) | ||
|
||
// @title Swagger Example API | ||
// @version 1.0 | ||
|
||
// @securityDefinitions.apikey APIKeyAuth | ||
// @in header | ||
// @name Authorization | ||
|
||
// @security APIKeyAuth | ||
func main() { | ||
http.HandleFunc("/testapi/application", api.GetApplication) | ||
http.ListenAndServe(":8080", nil) | ||
} | ||
// @securityDefinitions.basic BasicAuth | ||
|
||
// @securityDefinitions.oauth2.application OAuth2Application | ||
// @tokenUrl https://example.com/oauth/token | ||
// @scope.write Grants write access | ||
// @scope.admin Grants read and write access to administrative information | ||
|
||
// @security APIKeyAuth || OAuth2Application | ||
func main() {} |