{"id":40864919,"url":"https://github.com/upwork/donkey-core","last_synced_at":"2026-01-22T00:16:43.065Z","repository":{"id":32162986,"uuid":"130127994","full_name":"upwork/donkey-core","owner":"upwork","description":"DSL grammar and code generation tool for defining contracts of RESTful services","archived":false,"fork":false,"pushed_at":"2023-02-27T23:23:03.000Z","size":76,"stargazers_count":7,"open_issues_count":1,"forks_count":2,"subscribers_count":11,"default_branch":"master","last_synced_at":"2023-08-05T09:11:06.582Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","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/upwork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-18T22:16:06.000Z","updated_at":"2022-09-12T12:24:15.000Z","dependencies_parsed_at":"2022-08-07T17:15:30.460Z","dependency_job_id":null,"html_url":"https://github.com/upwork/donkey-core","commit_stats":null,"previous_names":[],"tags_count":4,"template":null,"template_full_name":null,"purl":"pkg:github/upwork/donkey-core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upwork%2Fdonkey-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upwork%2Fdonkey-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upwork%2Fdonkey-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upwork%2Fdonkey-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/upwork","download_url":"https://codeload.github.com/upwork/donkey-core/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upwork%2Fdonkey-core/sbom","scorecard":{"id":911602,"data":{"date":"2025-08-11","repo":{"name":"github.com/upwork/donkey-core","commit":"b1bc740505d0faee2701f8479c3686a14fe3276a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"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":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"Code-Review","score":2,"reason":"Found 3/12 approved changesets -- score normalized to 2","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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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":"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: Apache License 2.0: 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":"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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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 6 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":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-5mg8-w23w-74h3","Warn: Project is vulnerable to: GHSA-7g45-4rm6-3mm3","Warn: Project is vulnerable to: GHSA-mvr2-9pj6-7w5j","Warn: Project is vulnerable to: GHSA-6phf-73q6-gh87","Warn: Project is vulnerable to: GHSA-p66x-2cv9-qq3v","Warn: Project is vulnerable to: GHSA-wxr5-93ph-8wr9","Warn: Project is vulnerable to: GHSA-6hgm-866r-3cjv","Warn: Project is vulnerable to: GHSA-fjq5-5j5f-mvxh","Warn: Project is vulnerable to: GHSA-j288-q9x7-2f5v"],"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-24T19:24:58.499Z","repository_id":32162986,"created_at":"2025-08-24T19:24:58.499Z","updated_at":"2025-08-24T19:24:58.499Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28647922,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T21:29:11.980Z","status":"ssl_error","status_checked_at":"2026-01-21T21:24:31.872Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-01-22T00:16:42.924Z","updated_at":"2026-01-22T00:16:43.058Z","avatar_url":"https://github.com/upwork.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## What is donkey\n\nDonkey is DSL for defining RESTful services and code generation tool. Donkey \"maps\" the business logic of your microservice to HTTP semantics, making the application available as a RESTful service:\n\n```\n## API for managing users\nresource Users \"/users\" {\n\n    GET \"/{name}\" User getUser(pathParam string name) throws UserNotFoundException;\n\n    POST void addUser(requestBody User user, headerParam headerName(some.header.name) string someHeader);\n\n    ## Search for users registered at a given address\n    POST \"/search-by-addresses\" UserList searchUsersByAddress(requestBody Address address)\n        throws AddressMalformedException;\n}\n```\n\nWith Donkey code generator, you can create a client from the IDL file for any programming language or framework. See examples for Java (Springboot) and PHP (Symfony4, Guzzle) [here](http://github.com/upwork/donkey-example).\n\nWe have used Donkey at [Upwork](http://upwork.com) to support our microservice architecture. We enjoy qualities of [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) and its simplicity, while using Donkey allows us to evolve infrastructure rapidly, by fully decoupling service contract from implementation details.\n\n## Donkey IDL reference\n\nSee [REFERENCE.md](REFERENCE.md) for complete Donkey IDL reference\n\n## Installation and CLI\n\n`donkey-core` provides the DSL and the generic mechanism for code generation. For data types there are plenty of good solutions that you can re-use, such as Apache Thrift. For the RESTful service and client, however, it depends on your framework of choice and various infrastructure detail specific to your company and your project. For that reason, the actual generators need to be implemented by you.\n\n### Build a custom CLI tool with Donkey\n\nThis is what we do at Upwork. We set up a maven project called \"donkey-upwork\" with Upwork specific generators (for different Java frameworks and for PHP frontend). Donkey is included as a library:\n\n```\n    \u003cgroupId\u003ecom.upwork.donkey\u003c/groupId\u003e\n    \u003cartifactId\u003edonkey-upwork\u003c/artifactId\u003e\n    \u003cversion\u003e1.0-SNAPSHOT\u003c/version\u003e\n\n    \u003cdependencies\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003ecom.upwork.donkey\u003c/groupId\u003e\n            \u003cartifactId\u003edonkey-core\u003c/artifactId\u003e\n            \u003cversion\u003e0.1\u003c/version\u003e\n        \u003c/dependency\u003e\n```\n\nwe set Donkey's Main class as the entry point for the application:\n\n```\n\u003cbuild\u003e\n\u003cplugins\u003e\n    \u003cplugin\u003e\n        \u003cinherited\u003etrue\u003c/inherited\u003e\n        \u003cgroupId\u003eorg.apache.maven.plugins\u003c/groupId\u003e\n        \u003cartifactId\u003emaven-shade-plugin\u003c/artifactId\u003e\n        \u003cexecutions\u003e\n            \u003cexecution\u003e\n                \u003cphase\u003epackage\u003c/phase\u003e\n                \u003cgoals\u003e\n                    \u003cgoal\u003eshade\u003c/goal\u003e\n                \u003c/goals\u003e\n                \u003cconfiguration\u003e\n                    \u003ctransformers\u003e\n                        \u003ctransformer implementation=\"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer\"\u003e\n                            \u003cmainClass\u003ecom.upwork.donkey.core.Main\u003c/mainClass\u003e\n                        \u003c/transformer\u003e\n                    \u003c/transformers\u003e\n                \u003c/configuration\u003e\n            \u003c/execution\u003e\n        \u003c/executions\u003e\n    \u003c/plugin\u003e\n    ...\n```\nwhich allows us to generate code from the command line as follows:\n\n```\njava -jar donkey-upwork-1.0.jar -i ./service.idl -o ./ -g com.upwork.donkey.generators.ClientGenerator\n```\n\n## Contribution\n\nFor bugs, questions and discussions please use the [GitHub Issues](https://github.com/upwork/donkey-core/issues).\n\nDonkey grammar is based on Donkey.g4 file and uses ANTLR v4.6 parser generated based on that grammar. Use `antlr4 Donkey.g4 -o ../../java/com/upwork/donkey/core/parser/antlr -package com.upwork.donkey.core.parser.antlr` to generate parser classes if you changed Donkey.g4 grammar. Get `antlr4` as per instructions [here](http://www.antlr.org)\n\n## LICENSE\n\nCopyright 2018 Upwork Global Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n\u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fupwork%2Fdonkey-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fupwork%2Fdonkey-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fupwork%2Fdonkey-core/lists"}