{"id":15482992,"url":"https://github.com/devth/mattermost-clj","last_synced_at":"2025-07-02T01:31:30.797Z","repository":{"id":45811975,"uuid":"220846756","full_name":"devth/mattermost-clj","owner":"devth","description":"Generated Mattermost OpenAPI Client","archived":false,"fork":false,"pushed_at":"2020-02-24T19:01:59.000Z","size":96,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T15:23:39.168Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"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/devth.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}},"created_at":"2019-11-10T20:25:37.000Z","updated_at":"2020-07-02T14:06:08.000Z","dependencies_parsed_at":"2022-07-18T23:02:31.662Z","dependency_job_id":null,"html_url":"https://github.com/devth/mattermost-clj","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devth/mattermost-clj","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devth%2Fmattermost-clj","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devth%2Fmattermost-clj/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devth%2Fmattermost-clj/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devth%2Fmattermost-clj/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devth","download_url":"https://codeload.github.com/devth/mattermost-clj/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devth%2Fmattermost-clj/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263059639,"owners_count":23407391,"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":[],"created_at":"2024-10-02T05:10:28.607Z","updated_at":"2025-07-02T01:31:30.772Z","avatar_url":"https://github.com/devth.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mattermost-clj\n\nThis is a generated [Mattermost API](https://api.mattermost.com/) client. It\nuses [Mattermost's OpenAPI\nspecification](https://api.mattermost.com/static/mattermost-openapi-v4.yaml) and\nthe [openapi-generator](https://github.com/OpenAPITools/openapi-generator) tool.\n\n## Coordinates\n\n```clojure\n[mattermost-clj \"4.0.0\"]\n```\n\n## Usage\n\n```clojure\n(require '[mattermost-clj.core :as mattermost])\n\n(def my-token \"xxxyyyzzz\")\n\n(def host \"my-mattermost-instance.herokuapp.com\")\n\n(mattermost/set-api-context\n   {:debug true\n    :base-url (str \"https://\" host \"/api/v4\")\n    :auths {\"api_key\" (str \"Bearer \" token)}})\n\n;; try calling an API\n(require '[mattermost-clj.api.teams :as teams])\n\n(teams/teams-get-with-http-info)\n```\n\n## Dev\n\n### Prerequisites\n\n```bash\nbrew install openapi-generator\n```\n\n## Explore the `openapi-generator` CLI\n\n```bash\nopenapi-generator help\nopenapi-generator help generate\nopenapi-generator config-help -g clojure\n```\n\n### Obtain OpenAPI spec\n\nObtain a fresh copy of the spec and commit this to the repo to keep it in sync\nwith generated source:\n\n```bash\ncurl -o openapi.yaml https://api.mattermost.com/static/mattermost-openapi-v4.yaml\n```\n\nNote: use openapi-generator 3.x. 4.x generates buggy Clojure specs that break\nthe generated client.\n\nTo install 3.3.0:\n\n```bash\nbrew install https://raw.githubusercontent.com/Homebrew/homebrew-core/53d1f029cb5694a41640cff05a3791e5ffac37c6/Formula/openapi-generator.rb\n```\n\n### Generate the client\n\nThe spec contains a few validation errors, so we need to skip validation with\n`--skip-validate-spec` in order to generate.\n\n```bash\n\nopenapi-generator generate \\\n    --skip-validate-spec \\\n    -i openapi.yaml -c gen-config.json -g clojure -o client\n```\n\nKnow validation errors are:\n\n```\nSemantic error at paths./posts/{post_id}/patch.put.parameters.1.schema.properties.file_ids\nSchemas with 'type: array', require a sibling 'items: ' field\nLine 6546\n\nStructural error at paths./system/ping.get.responses.500\nshould NOT have additional properties\nadditionalProperty: schema\nLine 7564\n\nStructural error at paths./brand/image.get.responses.404\nshould NOT have additional properties\nadditionalProperty: description\nLine 9910\n\nStructural error at paths./brand/image.delete.responses.404\nshould NOT have additional properties\nadditionalProperty: description\nLine 9995\n```\n\nManually patched openapi.yaml to fix these. Follow along on [the GitHub\nissue](https://github.com/mattermost/mattermost-api-reference/issues/468) which\nrecommends fixes.\n\n- Manually patched to include auth in calls via:\n\n  ```\n  :auth-names    [\"api_key\"]\n  ```\n\n  Note: these namespaces have been patched:\n\n  - `teams`\n  - `bots`\n  - `posts`\n  - `channels`\n  - `users`\n\n⚠ **We can't regenerate the client at this point since so many manual patches\nneeded to be applied.** ⚠\n\nReported in issue\n[#485](https://github.com/mattermost/mattermost-api-reference/issues/485).\n\n### Install client locally\n\n```bash\ncd client \u0026\u0026 lein install; cd ..\n```\n\n### Deploy to Clojars\n\nMake sure to bump version in `clilent/project.clj` first.\n\n```bash\ncd client \u0026\u0026 lein deploy; cd ..\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevth%2Fmattermost-clj","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevth%2Fmattermost-clj","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevth%2Fmattermost-clj/lists"}