{"id":18274808,"url":"https://github.com/lucid-services/serviser-sdk","last_synced_at":"2025-04-09T03:44:34.522Z","repository":{"id":57356813,"uuid":"169544393","full_name":"lucid-services/serviser-sdk","owner":"lucid-services","description":"SDK client plugin for `serviser` based apps and a SDK package generator","archived":false,"fork":false,"pushed_at":"2019-03-11T14:46:13.000Z","size":155,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T10:34:40.226Z","etag":null,"topics":["axios","client","http","sdk"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lucid-services.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2019-02-07T09:02:46.000Z","updated_at":"2019-03-11T18:11:19.000Z","dependencies_parsed_at":"2022-09-26T16:32:05.725Z","dependency_job_id":null,"html_url":"https://github.com/lucid-services/serviser-sdk","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucid-services%2Fserviser-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucid-services%2Fserviser-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucid-services%2Fserviser-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucid-services%2Fserviser-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucid-services","download_url":"https://codeload.github.com/lucid-services/serviser-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247974595,"owners_count":21026742,"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":["axios","client","http","sdk"],"created_at":"2024-11-05T12:10:49.886Z","updated_at":"2025-04-09T03:44:34.492Z","avatar_url":"https://github.com/lucid-services.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/lucid-services/serviser-sdk.svg?branch=master)](https://travis-ci.org/lucid-services/serviser-sdk)  \n\n### Peer Dependencies\n\n* `serviser` \u003e= `1.0.0`\n* `serviser-doc` \u003e= `2.0.0`\n\n### Generating a SDK client npm package for a `serviser` based application\n\nRequires `serviser-doc` package to be plugged in along the `serviser-sdk` plugin.  \nLoad them at bottom of your `index.js`:  \n\n```javascript\n//index.js\n//...\nconst Service = require('serviser');\nconst service = new Service(/*...*/);\nmodule.exports = service;\n//...\n\n//Load the plugins\nrequire('serviser-doc');\nrequire('serviser-sdk');\n```\n\nMake sure that your project's `index.js` exports the `Service` instance object.  \nand then just call the `build:sdk` command:  \n\n```bash\n\u003e cd ./path/to/my/serviser-project\n#builds SDKs for all supported apps (zip files are written to cwd)\nproject/root\u003e ./node_modules/.bin/serviser build:sdk\n\n#view available cmd options\nproject/root\u003e ./node_modules/.bin/serviser build:sdk --help\n```\n\nAn alternative way is to use standalone `serviser-sdk` executable and provide it with API specification source from which SDKs are generated:  \n\n```bash\n# generates SDKs into zip packages in cwd\n\u003e serviser-sdk --specs \"http://docs.service.com/specs\" #url must return json in format {\"v1.0\": {/*Open API 2.0/3.0 specs*/}}\n\n\u003e # eventually\n\u003e ./node_modules/.bin/serviser build:sdk --help\n\u003e ./node_modules/.bin/serviser-sdk --help\n\u003e ./node_modules/.bin/serviser-doc --help\n```\n\n\n### npm package version schema of generated SDKs\n\nexample:  \nserviser-sdk: `1.0.0`  \nyour-project-name: `0.5.0`\n\nyour-project-name-private-sdk: `1.0.0-x.0.5.0`\nyour-project-name-public-sdk: `1.0.0-x.0.5.0`\n\n### Defining a generated SDK module as a npm dependency\n\n```json\n{\n    \"dependencies\": {\n        \"your-project-name-private-sdk\": \"^1.0.0-x.0.5.0 \u003c1.0.0-x.1.0.0\"\n    }\n}\n```\n\nThe above version restriction will match for example:  \n\n* `1.0.0-x.0.5.0`\n* `1.0.0-x.0.6.0`\n* `1.0.0-x.0.6.1`\n\nbut will **NOT** match:  \n\n* `1.0.0-x.1.0.0`\n* `1.0.1-x.0.5.0`\n* `1.1.0-x.0.5.0`\n* `2.1.0-x.0.5.0`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucid-services%2Fserviser-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucid-services%2Fserviser-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucid-services%2Fserviser-sdk/lists"}