{"id":26164702,"url":"https://github.com/optum/faas-swagger","last_synced_at":"2025-04-14T15:22:09.335Z","repository":{"id":51231879,"uuid":"225718050","full_name":"Optum/faas-swagger","owner":"Optum","description":"Swagger for Openfaas","archived":false,"fork":false,"pushed_at":"2021-05-19T17:01:46.000Z","size":13744,"stargazers_count":18,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-14T15:22:01.159Z","etag":null,"topics":["openfaas","serverless","swagger","swagger-ui"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Optum.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"docs/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-03T21:19:12.000Z","updated_at":"2025-02-11T21:57:11.000Z","dependencies_parsed_at":"2022-09-26T18:41:55.348Z","dependency_job_id":null,"html_url":"https://github.com/Optum/faas-swagger","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Optum%2Ffaas-swagger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Optum%2Ffaas-swagger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Optum%2Ffaas-swagger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Optum%2Ffaas-swagger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Optum","download_url":"https://codeload.github.com/Optum/faas-swagger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248904626,"owners_count":21180836,"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","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":["openfaas","serverless","swagger","swagger-ui"],"created_at":"2025-03-11T15:39:46.503Z","updated_at":"2025-04-14T15:22:09.301Z","avatar_url":"https://github.com/Optum.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Swagger for Openfaas\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/optum/faas-swagger)](https://goreportcard.com/badge/github.com/optum/faas-swagger)\n[![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go\u0026logoColor=white)](https://pkg.go.dev/github.com/optum/faas-swagger)\n[![LICENSE](https://img.shields.io/github/license/knative/serving.svg)](https://github.com/optum/faas-swagger/blob/master/LICENSE)\n\n\nSwagger interface for openfaas functions\n\n### Whats it About\n\n* Document your Openfaas functions in OpenAPI 3.0 Spec and visualize it in a swagger ui.\n* Uses the annotations in the function descriptor yml to look for the swagger config.\n* Test functions from swagger ui\n\n----------------\n\n![](assets/output.gif)\n\n----------------\n\n### Function\n\nNavigate to the [function](./function) folder to deploy the swagger yaml generator.\n\n-----------------\n\n### UI\n\nThe function will generate the swagger yaml. To visualize, deploy the swaggerui-proxy component as below \n\n```\nko apply -RBf config/\n```\n\nOnce the component is created access the ui at `/swaggerui/` path.\n\n------------------\n\n### Usage\n\nAdd your api spec (json format) in the function descriptor(stack.yaml) as annotation. Use this [example](./lib/test/test-files/example/example.yaml).\n\nAfter deploying your function with this annotation, you should be able see the paths in swagger ui\n\n* We are following open api 3.0 spec\n* Please make sure the json is well formatted.\n* In swagger 3.0, the spec is defined in yaml. You can define in yaml and convert to json using online editor like [this](https://codebeautify.org/yaml-to-json-xml-csv)\n* If annotatation is not provided , by default just the path will be shown.\n\n---------\n\n### Authentication\n\nSupports the basic auth plugin.\n\nImplement the [OFAuth](./pkg/auth/auth.go) interface for other options\n\n-----------------\n\n### GO Packages\n\nThe [swagger](./pkg/swagger) package can be used as a standalone in your GO function. \n\n----------\n### Contributing to the Project\nThe team is open to contributions to our project. For more details, see our [Contribution Guide.](./docs/CONTRIBUTING.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foptum%2Ffaas-swagger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foptum%2Ffaas-swagger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foptum%2Ffaas-swagger/lists"}