{"id":21422035,"url":"https://github.com/c272/burrito","last_synced_at":"2025-03-16T20:20:39.140Z","repository":{"id":38089718,"uuid":"242773148","full_name":"c272/burrito","owner":"c272","description":"Wraps up a given API in a C# class library, and gives it a nice meaty filling.","archived":false,"fork":false,"pushed_at":"2022-12-08T09:47:49.000Z","size":358,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-23T06:45:14.778Z","etag":null,"topics":["api","api-generator","csharp"],"latest_commit_sha":null,"homepage":null,"language":"C#","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/c272.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":"2020-02-24T15:34:55.000Z","updated_at":"2020-02-28T09:26:19.000Z","dependencies_parsed_at":"2023-01-24T22:45:09.863Z","dependency_job_id":null,"html_url":"https://github.com/c272/burrito","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c272%2Fburrito","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c272%2Fburrito/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c272%2Fburrito/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c272%2Fburrito/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/c272","download_url":"https://codeload.github.com/c272/burrito/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243925990,"owners_count":20369914,"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":["api","api-generator","csharp"],"created_at":"2024-11-22T20:41:44.146Z","updated_at":"2025-03-16T20:20:39.112Z","avatar_url":"https://github.com/c272.png","language":"C#","readme":"\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/c272/burrito/master/logo.png\"/\u003e\n\u003cimg src=\"https://img.shields.io/github/issues/c272/burrito\"\u003e \u003cimg src=\"https://img.shields.io/travis/c272/burrito\"\u003e \u003cimg src=\"https://img.shields.io/badge/%2ENET-\u003e=4.7.1-blue\"\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\nA simple, easy to use command line API  wrapper generator, that will bundle up your favourite JSON APIs and  create a C# project out of it, and will **automagically** generate classes for the data that is sent back from the API. The most basic command usage for Burrito is including a single source file, like below:\n\n```bash\nburrito -s schema.json\n```\nBurrito also supports asynchronous methods using `Task`, and can include `POST`, `GET` and other HTTP methods, with custom URL parameters that are automatically added to API methods.\n\n## Getting Started\nTo get started using Burrito on Windows, all you'll need is .NET Framework 4.7.1 or later, and you can download one of the prebuilt binaries from the [Releases tab](https://github.com/c272/burrito/releases) on the main repository page.\n\nIf you're using Linux, however, you'll have to build the project using Mono and `mkbundle`. Make sure you have the following dependencies installed as a nuget packages before attempting to build with `mkbundle`:\n\n - `Newtonsoft.Json 12.0.0.0` (**version specific**)\n - `Microsoft.CodeAnalysis.CSharp`\n - `ILRepack`\n\nOnce this is done, you can use a simple `mkbundle` command such as the example below to create a native executable for your distro:\n```bash\nmkbundle -o burrito --simple bin/Debug/burrito.exe --machine-config /etc/mono/4.5/machine.config --no-config --nodeps bin/Debug/*.dll\n```\n\n## Usage\n### Basics\nTo create an API wrapper with Burrito, you first need to write an **API schema**. These are extremely simple representations of the routes that you're trying to add to the wrapper. A barebones simple example is below:\n```json\n{\n\t\"name\": \"ExampleAPI\",\n\t\"root\": \"https://www.example.com/\",\n\t\"sections\": [\n\t\t{\n\t\t\t\"name\": \"API\",\n\t\t\t\"routes\": [\n\t\t\t\t{\n\t\t\t\t\t\"route\": \"test/\",\n\t\t\t\t\t\"type\": \"GET\",\n\t\t\t\t\t\"returns\": \"TestData\"\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t]\n}\n```\nThere are many parts about each route that you can customize, which are defined in the [API Schema wiki page,](https://github.com/c272/burrito/wiki/API-Schema) as well as the manual.\n\nOnce you've created your API schema, you can simply feed it into Burrito and it will generate an API wrapper project.\n\n```bash\nburrito -s example.json\n```\nThere are many console flags that you can apply for different outputs of project, such as only creating a `.dll` and no project files, or generating both asynchronous and synchronous methods. Those are shown on the [Command Line Arguments wiki page](https://github.com/c272/burrito/wiki/Console-Arguments).\n\n### Examples\nAs an example of how to set up and use a Burrito API, see the \"[DnD5e-cs](https://github.com/c272/dnd5e-cs)\" project, set up as an example of how an API wrapper can be implemented for NuGet.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc272%2Fburrito","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fc272%2Fburrito","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc272%2Fburrito/lists"}