{"id":16142870,"url":"https://github.com/webitel/webitel-openapi-client-go","last_synced_at":"2026-05-01T13:31:38.271Z","repository":{"id":257814407,"uuid":"868793466","full_name":"webitel/webitel-openapi-client-go","owner":"webitel","description":"Webitel OpenAPI Client for Go","archived":false,"fork":false,"pushed_at":"2025-02-16T18:46:53.000Z","size":1217,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-06T19:22:34.801Z","etag":null,"topics":["go","openapi","swagger","webitel"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webitel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-10-07T07:41:05.000Z","updated_at":"2025-02-16T18:46:59.000Z","dependencies_parsed_at":"2024-10-08T09:23:35.273Z","dependency_job_id":"8ed94472-6126-4c4c-a778-dc55fff9ecfc","html_url":"https://github.com/webitel/webitel-openapi-client-go","commit_stats":null,"previous_names":["webitel/webitel-openapi-client-go"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/webitel/webitel-openapi-client-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webitel%2Fwebitel-openapi-client-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webitel%2Fwebitel-openapi-client-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webitel%2Fwebitel-openapi-client-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webitel%2Fwebitel-openapi-client-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webitel","download_url":"https://codeload.github.com/webitel/webitel-openapi-client-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webitel%2Fwebitel-openapi-client-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32499681,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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":["go","openapi","swagger","webitel"],"created_at":"2024-10-10T00:07:37.727Z","updated_at":"2026-05-01T13:31:38.254Z","avatar_url":"https://github.com/webitel.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Webitel HTTP OpenAPI Client for Go\n\nThis HTTP Go client for [Webitel](https://github.com/webitel) is generated from [Webitel's OpenAPI specification](https://github.com/webitel/protos/blob/main/swagger/api.json) using [swagger for Go](https://github.com/go-swagger/go-swagger).\n\n## Generate the client\n\nOnce bingo \u0026 swagger are installed (see [Dependencies](#dependencies)), generate the client for _all Webitel APIs_, with the following `make` command:\n\n```bash\nmake generate-client\n```\n\nThis runs the Swagger generation command.\n\nTo generate the client for a _specific Webitel API_, find the name of its tag and model in the [Webitel OpenAPI specification](https://github.com/webitel/protos/blob/main/swagger/api.json). Then, set those as environment variables and run the command to generate it:\n```bash\nexport API_TAG=CalendarService\nexport MODEL=engineCalendar\nmake generate-client\n```\n\n### How to use custom templates\n\nIn order to generate the client, `go-swagger` uses default templates. These templates can be customised to add custom configuration that are applied each time the client is generated.\n\nFor more information, check out the `go-swagger` docs on how to [use custom templates](https://github.com/go-swagger/go-swagger/blob/master/docs/generate/templates.md). The default template definitions for the client can be found in [go-swagger/generator/templates/client/](https://github.com/go-swagger/go-swagger/tree/master/generator/templates/client).\n\nIn this project, the custom templates can be found in `templates/`. They are provided to the generation command through the flag `--template-dir=templates`.\n\nThe custom templates provide added functionality for things such as authentication, TLS/SSL, retries, and custom error handling.\n\n## Build the client\n\n### Configuration\n\nThe client has the following friendly configuration options:\n\n```go\nimport goapi \"github.com/webitel/webitel-openapi-client-go/client\"\n\ncfg := \u0026goapi.TransportConfig{\n    // Host is the doman name or IP address of the host that serves the API.\n    Host:       \"dev.webitel.com\",\n    \n    // BasePath is the URL prefix for all API paths, relative to the host root.\n    BasePath:   \"/api\",\n    \n    // Schemes are the transfer protocols used by the API (http or https).\n    Schemes:    []string{\"http\"},\n    \n    // APIKey is an optional API key or service account token.\n    APIKey:     os.Getenv(\"WEBITEL_ACCESS_TOKEN\"),\n    \n    // TLSConfig provides an optional configuration for a TLS client\n    TLSConfig:  \u0026tls.Config{},\n    \n    // NumRetries contains the optional number of attempted retries\n    NumRetries: 3,\n    \n    // RetryTimeout sets an optional time to wait before retrying a request\n    RetryTimeout: 0,\n    \n    // RetryStatusCodes contains the optional list of status codes to retry\n    // Use \"x\" as a wildcard for a single digit (default: [429, 5xx])\n    RetryStatusCodes: []string{\"420\", \"5xx\"},\n    \n    // HTTPHeaders contains an optional map of HTTP headers to add to each request\n    HTTPHeaders: map[string]string{},\n}\n\nclient := goapi.NewHTTPClientWithConfig(strfmt.Default, cfg)\n```\n\n### Examples\n\nCheckout how the Webitel Terraform Provider initialises and uses the client [here](https://github.com/webitel/terraform-provider-webitel/blob/7eedb7d12107377d3c20922887a183aede56a47e/internal/provider/provider.go#L140-L172).\n\nThe `goswagger` documentation have more information about how to [build a client](https://goswagger.io/go-swagger/generate/client/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebitel%2Fwebitel-openapi-client-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebitel%2Fwebitel-openapi-client-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebitel%2Fwebitel-openapi-client-go/lists"}