{"id":13632441,"url":"https://github.com/Cowboy-coder/yipp","last_synced_at":"2025-04-18T02:33:07.230Z","repository":{"id":141673380,"uuid":"432982933","full_name":"Cowboy-coder/yipp","owner":"Cowboy-coder","description":"An api tool for building rest apis, heavily inspired by GQL syntax.","archived":false,"fork":false,"pushed_at":"2021-12-19T11:42:31.000Z","size":272,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-01T22:53:20.857Z","etag":null,"topics":["api","schema"],"latest_commit_sha":null,"homepage":"https://www.yipp.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cowboy-coder.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-11-29T09:39:45.000Z","updated_at":"2022-08-24T12:32:50.000Z","dependencies_parsed_at":"2024-04-16T10:05:17.463Z","dependency_job_id":null,"html_url":"https://github.com/Cowboy-coder/yipp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cowboy-coder%2Fyipp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cowboy-coder%2Fyipp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cowboy-coder%2Fyipp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cowboy-coder%2Fyipp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cowboy-coder","download_url":"https://codeload.github.com/Cowboy-coder/yipp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223772230,"owners_count":17199972,"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","schema"],"created_at":"2024-08-01T22:03:03.170Z","updated_at":"2024-11-09T00:31:20.861Z","avatar_url":"https://github.com/Cowboy-coder.png","language":"TypeScript","readme":"yipp\n====\n\nUse a GQL-inspired syntax to build a schema-first driven REST API.\n\n```graphql\n# schema.yipp\n\ntype FieldError {\n  field: String!\n  message: String!\n}\n\ntype Error {\n  message: String!\n  fields: [FieldError!]!\n} \n\nenum UserType {\n  admin\n  user\n}\n  \nlogin: POST /login {\n  body: {\n    username: String!\n    password: String!\n  }\n  200: {\n    body: {\n      token: String!\n    }\n  }\n  400: {\n    body: Error\n  }\n} \n\ngetUser: GET /users/:id(Int) {\n  headers: {\n    authorization: String!\n  }\n  \n  200: {\n    body: {\n      id: Int!\n      username: String!\n      type: UserType!\n    }\n  }\n\n  400: {\n    body: Error\n  }\n}\n```\n\n### Install and usage\n\n\n```\nnpm install -g yipp\nyipp axios-client output.ts schema.yipp\n```\n\n### CLI\n\nCan be used to generate different clients, servers, etc.\n\nExample of generators using [this schema](https://github.com/Cowboy-coder/yipp/tree/master/src/examples/schemas/):\n- [`fastify-plugin`](https://github.com/Cowboy-coder/yipp/tree/master/src/examples/fastify/routes.ts) - Fastify Plugin\n- [`axios-client`](https://github.com/Cowboy-coder/yipp/tree/master/src/examples/axios-client/generated.ts) - HTTP Client using Axios\n\n```\nUsage: yipp [options] \u003ctype\u003e \u003coutput-file\u003e \u003cinput-file...\u003e\n\ngenerate\n\nArguments:\n  type         (choices: \"fastify-plugin\", \"axios-client\")\n  output-file  generated typescript file\n  input-file   One or more api schema files. Will be merged into one schema if several files.\n\nOptions:\n  -w --watch   watch for changes (default: false)\n  -h, --help   display help for command\n```\n\n🐄\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCowboy-coder%2Fyipp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCowboy-coder%2Fyipp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCowboy-coder%2Fyipp/lists"}