{"id":13713318,"url":"https://github.com/parvez3019/go-swagger3","last_synced_at":"2025-10-05T11:59:19.628Z","repository":{"id":40408805,"uuid":"373055212","full_name":"parvez3019/go-swagger3","owner":"parvez3019","description":"Swagger 3.0 implementation for go","archived":false,"fork":false,"pushed_at":"2025-04-10T14:54:57.000Z","size":1809,"stargazers_count":133,"open_issues_count":12,"forks_count":21,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-24T05:02:37.753Z","etag":null,"topics":["documentation","go","go-documentation","go-swag","go-swagger","library","open-source","openapi","openapi-documentation","openapi-spec","openapi-specification","openapi3","swagger","swagger-docs","swagger-generator","swagger3"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/parvez3019.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-06-02T05:54:10.000Z","updated_at":"2025-05-16T04:00:21.000Z","dependencies_parsed_at":"2023-02-09T11:01:49.636Z","dependency_job_id":"44df6e66-0fd2-4906-ac14-45c43ea9073e","html_url":"https://github.com/parvez3019/go-swagger3","commit_stats":{"total_commits":131,"total_committers":11,"mean_commits":"11.909090909090908","dds":0.3740458015267175,"last_synced_commit":"7524639a9ea240ce8bd786b2f03dab6439cbfa42"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/parvez3019/go-swagger3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parvez3019%2Fgo-swagger3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parvez3019%2Fgo-swagger3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parvez3019%2Fgo-swagger3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parvez3019%2Fgo-swagger3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parvez3019","download_url":"https://codeload.github.com/parvez3019/go-swagger3/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parvez3019%2Fgo-swagger3/sbom","scorecard":{"id":721147,"data":{"date":"2025-08-11","repo":{"name":"github.com/parvez3019/go-swagger3","commit":"7109250f59860ba030a0fed9e34c67c838046bc0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.5,"checks":[{"name":"Code-Review","score":6,"reason":"Found 9/13 approved changesets -- score normalized to 6","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":2,"reason":"3 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/ci.yml:8","Warn: no topLevel permission defined: .github/workflows/docker.yml:1","Info: topLevel 'contents' permission set to 'read': .github/workflows/golangci-lint.yml:7","Info: topLevel 'pull-requests' permission set to 'read': .github/workflows/golangci-lint.yml:8","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/parvez3019/go-swagger3/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/parvez3019/go-swagger3/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docker.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/parvez3019/go-swagger3/docker.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/parvez3019/go-swagger3/docker.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/parvez3019/go-swagger3/docker.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/parvez3019/go-swagger3/docker.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/golangci-lint.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/parvez3019/go-swagger3/golangci-lint.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/golangci-lint.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/parvez3019/go-swagger3/golangci-lint.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/golangci-lint.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/parvez3019/go-swagger3/golangci-lint.yml/main?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating golang:alpine to golang:alpine@sha256:244baa35bcfaf9a5b3444519df6d42554a1f92dc33820bd98f0662df270d8a6a","Warn: goCommand not pinned by hash: Dockerfile:3","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 third-party GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned","Info:   0 out of   1 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":3,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'main'","Info: 'force pushes' disabled on branch 'main'","Warn: 'branch protection settings apply to administrators' is disabled on branch 'main'","Warn: could not determine whether codeowners review is allowed","Warn: no status checks found to merge onto branch 'main'","Warn: PRs are not required to make changes on branch 'main'; or we don't have data to detect it.If you think it might be the latter, make sure to run Scorecard with a PAT or use Repo Rules (that are always public) instead of Branch Protection settings"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 27 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T11:23:55.968Z","repository_id":40408805,"created_at":"2025-08-22T11:23:55.968Z","updated_at":"2025-08-22T11:23:55.968Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278450921,"owners_count":25988882,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["documentation","go","go-documentation","go-swag","go-swagger","library","open-source","openapi","openapi-documentation","openapi-spec","openapi-specification","openapi3","swagger","swagger-docs","swagger-generator","swagger3"],"created_at":"2024-08-02T23:01:32.415Z","updated_at":"2025-10-05T11:59:19.603Z","avatar_url":"https://github.com/parvez3019.png","language":"Go","funding_links":[],"categories":["Repositories"],"sub_categories":[],"readme":"### Demo\n\nClick here for [Youtube Demo Link](https://www.youtube.com/watch?v=GLM9c5j8g7I)\n\n\n# go-swagger3\n\nGenerate [OpenAPI Specification](https://swagger.io/specification) v3 file with comments in Go.\n\n### Table of content\n\n- [1. Install](#1-install)\n- [2. Documentation Generation](#2-documentation-generation)\n- [3. Usage](#3-usage)\n    - [Service Description](#service-description)\n    - [Handler functions](#handler-functions)\n    - [Title And Description](#title-and-description)\n    - [Parameter](#parameter)\n    - [Header](#header)\n    - [Header Parameters](#header-parameters)\n    - [Response](#response)\n    - [Resource \u0026 Tag](#resource--tag)\n    - [Route](#route)\n    - [Enums](#enums)\n- [4. Security](#4-security)\n- [5. Limitations](#5-limitations)\n- [6. References](#6-references)\n\n## 1. Install\n\n```\ngo install github.com/parvez3019/go-swagger3@latest\n```\n\n\n### 2. Documentation Generation\n#### Using binary\nGo to the folder where is main.go in\n\n``` shell\n// go.mod and main file are in the same directory\ngo-swagger3 --module-path . --output oas.json --schema-without-pkg --generate-yaml true\n\n// go.mod and main file are in the different directory\ngo-swagger3 --module-path . --main-file-path ./cmd/xxx/main.go --output oas.json --schema-without-pkg --generate-yaml true\n\n// in case you get 'command not found: go-swagger3' error, please export add GOPATH/bin to PATH\nexport PATH=\"$HOME/go/bin:$PATH\"\n\nNotes - \n- Pass schema-without-pkg flag as true if you want to generate schemas without package names\n- Pass generate-yaml as trus if you want to generate yaml spec file instead of json\n\n```\n\n#### Using docker\n``` shell\n// go.mod and main file are in the same directory\ndocker run -t --rm -v $(pwd):/app -w /app parvez3019/go-swagger3:latest --module-path . --output oas.json --schema-without-pkg --generate-yaml true\n\n// go.mod and main file are in the different directory\ndocker run -t --rm -v $(pwd):/app -w /app parvez3019/go-swagger3:latest --module-path . --main-file-path ./cmd/xxx/main.go --output oas.json --schema-without-pkg --generate-yaml true\n\nNotes - \n- Pass schema-without-pkg flag as true if you want to generate schemas without package names\n- Pass generate-yaml as trus if you want to generate yaml spec file instead of json\n\n```\n\n\n\n\n## 3. Usage\n\nYou can document your service by placing annotations inside your godoc at various places in your code.\n\n### Service Description\n\nThe service description comments can be located in any of your .go files. They provide general information about the service you are documenting.\n\n``` go\n// @Version 1.0.0\n// @Title Backend API\n// @Description API usually works as expected. But sometimes its not true.\n// @ContactName Parvez\n// @ContactEmail abce@email.com\n// @ContactURL http://someurl.oxox\n// @TermsOfServiceUrl http://someurl.oxox\n// @LicenseName MIT\n// @LicenseURL https://en.wikipedia.org/wiki/MIT_License\n// @Server http://www.fake.com Server-1\n// @Server http://www.fake2.com Server-2\n// @Security AuthorizationHeader read write\n// @SecurityScheme AuthorizationHeader http bearer Input your token\n```\n\n### Handler Functions\n\nBy adding comments to your handler func godoc, you can document individual actions as well as their input and output.\n\n``` go\ntype User struct {\n  ID   uint64 `json:\"id\" example:\"100\" description:\"User identity\"`\n  Name string `json:\"name\" example:\"Parvez\"` \n}\n\ntype UsersResponse struct {\n  Data []Users `json:\"users\" example:\"[{\\\"id\\\":100, \\\"name\\\":\\\"Parvez\\\"}]\"`\n}\n\ntype Error struct {\n  Code string `json:\"code\"`\n  Msg  string `json:\"msg\" skip:\"true\"`\n  // use skip:\"true\" if you want to skip the field in the documentation spec\n}\n\ntype ErrorResponse struct {\n  ErrorInfo Error `json:\"error\"`\n}\n\n// RequestHeaders represents the model for header params\n// @HeaderParameters RequestHeaders\ntype RequestHeaders struct {\n    Authorization  string  `json:\"Authorization\"`\n}\n\n// @Title Get user list of a group.\n// @Description Get users related to a specific group.\n// @Header model.RequestHeaders\n// @Param  groupID  path  int  true  \"Id of a specific group.\" \"120\"\n// @Success  200  object  UsersResponse  \"UsersResponse JSON\"\n// @Failure  400  object  ErrorResponse  \"ErrorResponse JSON\"\n// @Resource users\n// @Route /api/group/{groupID}/users [get]\nfunc GetGroupUsers() {\n  // ...\n}\n\n// @Title Get user list of a group.\n// @Description Create a new user.\n// @Param  user  body  User  true  \"Info of a user.\"\n// @Success  200  object  User           \"UsersResponse JSON\"\n// @Failure  400  object  ErrorResponse  \"ErrorResponse JSON\"\n// @Resource users\n// @Route /api/user [post]\nfunc PostUser() {\n  // ...\n}\n```\n\n#### Title And Description\n```\n@Title {title}\n@Title Get user list of a group.\n\n@Description {description}.\n@Description Get users related to a specific group.\n```\n- {title}: The title of the route.\n- {description}: The description of the route.\n\n#### Parameter\n```\n@Param  {name}    {in}  {goType}  {required}  {description}             {example}\n@Param  groupID   path  int       true        \"Id of a specific group.\" \"120\"\n```\n- {name}: The parameter name.\n- {in}: The parameter is in `path`, `query`, `form`, `header`, `cookie`, `body` or `file`.\n- {goType}: The type in go code. This will be ignored when {in} is `file`.\n- {required}: `true`, `false`, `required` or `optional`. \n- {description}: The description of the parameter. Must be quoted.\n- {example}: **Optional** example of this parameter. Must be quoted.\n\nOne can also override example for an object with `override-example` key in struct\neg -\n``` go\ntype Request struct {\n    version  model.Version `\"json:\"Version\" override-example:\"11.0.0\"`\n}\n```\n\n#### Header \n```\n@Header          {goType}\n@HeaderParameters   model.RequestHeaders\n```\n- Header query param for endpoints, parses the query param from the model\n\n#### Header Parameters\n```\n@Param              {goType}\n@HeaderParameters   RequestHeaders\n```\n\n- {goType}: The type in go code. This will be ignored when {in} is `file`.\n- Parses parameters from the type and keep it up component section for reference\n\n#### Response\n``` json\n@Success  {status}  {jsonType}  {goType}       {description}\n@Success  200       object      UsersResponse  \"UsersResponse JSON\"\n\n@Failure  {status}  {jsonType}  {goType}       {description}\n@Failure  400       object      ErrorResponse  \"ErrorResponse JSON\"\n```\n- {status}: The HTTP status code.\n- {jsonType}: The value can be `object` or `array`. \n- {goType}: The type in go code.\n- {description}: The description of the response. Must be quoted.\n\n#### Resource \u0026 Tag\n``` json\n@Resource {resource}\n@Resource users\n\n@Tag {tag}\n@tag xxx\n```\n\n- {resource}, {tag}: Tag of the route.\n\n#### Route\n\n``` json\n@Route {path}    {method}\n@Route /api/user [post]\n```\n\n- {path}: The URL path.\n- {method}: The HTTP Method. Must be put in brackets.\n\n#### Enums\n\n- To generate enums create type structs for enum field with comma-separated values as follows:\n- Create struct type fields with @Enum Tag\n- Example as follows-\n\n``` go\n// @Enum CountriesEnum\ntype CountriesEnum struct {\n    // Create the field name with same as struct name\n    CountriesEnum string `enum:\"india,china,mexico,japan\" example:\"india\"`\n}\n```\n\n##### How to add reference of Enum on types\n\n``` go\ntype Request struct {\n  Name string `json:\"name\" example:\"Parvez\"` \n  Country string `json:\"country\" $ref:\"CountriesEnum\"`\n}\n\n```\n\n#### Response body\nYou need to provide swagger fields as reflect tags in your structure. In example:\n```go\ntype Filter struct {\n\tRating       int    `json:\"rating\"`\n\tType         string `json:\"type\"`\n\tDistance     int64  `json:\"distance\", minimum:\"1\", maximum:\"100\"`\n\tDistrictCode string `json:\"district_code\", pattern:\"[a-z]{2}\\\\d[a-z]\\\\s\\\\d[a-z]{2}\"`\n}\n```\n\nAvailable fields:\n- type\n- format\n- required\n- properties\n- description\n- items\n- example\n- deprecated (bool)\n- ref\n- enum\n- title\n- maximum (float64)\n- exclusiveMaximum (bool)\n- minimum (float64)\n- exclusiveMinimum (bool)\n- maxLength (uint)\n- minLength (uint)\n- pattern\n- maxItems (uint)\n- minItems (uint)\n- uniqueItems (bool)\n- maxProperties (uint)\n- minProperties (uint)\n- additionalProperties (bool)\n- nullable (bool)\n- readOnly (bool)\n- writeOnly (bool)\n\n### 4. Security\n\nIf authorization is required, you must define security schemes and then apply those to the API. A scheme is defined\nusing `@SecurityScheme [name] [type] [parameters]` and applied by\nadding `@Security [scheme-name] [scope1] [scope2] [...]`.\n\nAll examples in this section use `MyApiAuth` as the name. This name can be anything you chose; multiple named schemes\nare supported. Each scheme must have its own name, except for OAuth2 schemes - OAuth2 supports multiple schemes by the\nsame name.\n\nA number of different types is supported, they all have different parameters:\n\n|Type|Description|Parameters|Example|\n|---|---|---|---|\n|HTTP|A HTTP Authentication scheme using the `Authorization` header|scheme: any [HTTP Authentication scheme](https://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml)|`@SecurityScheme MyApiAuth basic`|\n|APIKey|Authorization by passing an API Key along with the request|in: Location of the API Key, options are `header`, `query` and `cookie`. name: The name of the field where the API Key must be set|`@SecurityScheme MyApiAuth apiKey header X-MyCustomHeader`|\n|OpenIdConnect|Delegating security to a known OpenId server|url: The URL of the OpenId server|`@SecurityScheme MyApiAuth openIdConnect https://example.com/.well-known/openid-configuration`|\n|OAuth2AuthCode|Using the \"Authentication Code\" flow of OAuth2|authorizationUrl, tokenUrl|`@SecurityScheme MyApiAuth oauth2AuthCode /oauth/authorize /oauth/token`| \n|OAuth2Implicit|Using the \"Implicit\" flow of OAuth2|authorizationUrl|`@SecurityScheme MyApiAuth oauth2Implicit /oauth/authorize| \n|OAuth2ResourceOwnerCredentials|Using the \"Resource Owner Credentials\" flow of OAuth2|authorizationUrl|`@SecurityScheme MyApiAuth oauth2ResourceOwnerCredentials /oauth/token| \n|OAuth2ClientCredentials|Using the \"Client Credentials\" flow of OAuth2|authorizationUrl|`@SecurityScheme MyApiAuth oauth2ClientCredentials /oauth/token| \n\nAny text that is present after the last parameter wil be used as the description. For\ninstance `@SecurityScheme MyApiAuth basic Login with your admin credentials`.\n\nOnce all security schemes have been defined, they must be configured. This is done with the `@Security` comment.\nDepending on the `type` of the scheme, scopes (see below) may be supported. *At the moment, it is only possible to\nconfigure security for the entire service*.\n\n``` go\n// @Security MyApiAuth read_user write_user\n```\n\n#### Scopes\n\nFor OAuth2 security schemes, it is possible to define scopes using\nthe `@SecurityScope [schema-name] [scope-code] [scope-description]` comment.\n\n``` go\n// @SecurityScope MyApiAuth read_user Read a user from the system\n// @SecurityScope MyApiAuth write_user Write a user to the system\n```\n\n### 5. Limitations\n\n- Only support go module.\n- Anonymous struct field is not supported.\n\n### 6. References\n\n- The project is based on the following repositories -\n- [yvasiyarov/swagger](https://github.com/yvasiyarov/swagger)\n- [uudashr/go-module](https://github.com/uudashr/go-module)\n- [mikunalpha/goas](https://github.com/mikunalpha/goas)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparvez3019%2Fgo-swagger3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparvez3019%2Fgo-swagger3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparvez3019%2Fgo-swagger3/lists"}