{"id":19806343,"url":"https://github.com/ory/sdk","last_synced_at":"2025-05-15T00:14:20.750Z","repository":{"id":37405531,"uuid":"230928630","full_name":"ory/sdk","owner":"ory","description":"The place where ORY's SDKs are being auto-generated","archived":false,"fork":false,"pushed_at":"2025-04-29T14:44:10.000Z","size":201885,"stargazers_count":155,"open_issues_count":46,"forks_count":91,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-05-07T15:02:57.133Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","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/ory.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"patreon":"_ory","open_collective":"ory"}},"created_at":"2019-12-30T14:21:17.000Z","updated_at":"2025-05-01T18:01:46.000Z","dependencies_parsed_at":"2025-04-28T11:46:46.092Z","dependency_job_id":null,"html_url":"https://github.com/ory/sdk","commit_stats":{"total_commits":1626,"total_committers":30,"mean_commits":54.2,"dds":0.08548585485854854,"last_synced_commit":"eae1704b789d529ddb0b59c9176c4bad5ea023ce"},"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ory%2Fsdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ory%2Fsdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ory%2Fsdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ory%2Fsdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ory","download_url":"https://codeload.github.com/ory/sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253085699,"owners_count":21851682,"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-11-12T09:07:17.586Z","updated_at":"2025-05-15T00:14:20.697Z","avatar_url":"https://github.com/ory.png","language":"PHP","funding_links":["https://patreon.com/_ory","https://opencollective.com/ory"],"categories":[],"sub_categories":[],"readme":"# Generated SDKs for the Ory Ecosystem\n\nAll SDKs provided in this repository are generated using openapi-generator.\n\n## Ory Network SDKs\n\nWhen developing against [Ory Network](https://www.ory.sh/docs/sdk), use the\nlatest `client` or `ory-client` SDK for your preferred language. It bundles the\nindividual SDKs (Identities, OAuth2, Permissions) and works with\n[Ory API keys](https://www.ory.sh/docs/concepts/personal-access-token).\n\n## Ory self-hosted SDKs\n\nWhen developing against self-hosted Ory components (Kratos, Hydra, Keto), use\nthe corresponding individual SDKs for your language and match the SDK version to\nthe version of Kratos/Hydra/Keto you have deployed.\n\n## Publish the Docker Image\n\nTo publish the SDK Builder Docker Image, create a new GitHub release with the\ndesired version.\n\nYou may also manually build and publish this image using:\n\n```shell script\ndocker build --platform linux/adm64 -t oryd/sdk:latest .\ndocker tag oryd/sdk:latest oryd/sdk:v0.0.53\ndocker push oryd/sdk:v0.0.53\n```\n\n## Running the Image Locally\n\nIf you wish to debug some generators or build steps, you can run the image\nlocally:\n\n```shell script\ndocker build -t oryd/sdk:latest .\ndocker run --mount type=bind,source=\"$(pwd)\",target=/project --name sdk --user \"$(id -u):$(id -g)\" -it oryd/sdk:latest /bin/sh\n```\n\n### Debugging Failing Tests on CI\n\nIf a test fails in CI, you may run the following code snippet to reproduce the\nfailure locally:\n\n```shell script\ndocker build -t oryd/sdk:latest .\ndocker run --rm --mount type=bind,source=\"$(pwd)\",target=/project --name sdk -it oryd/sdk:latest /bin/bash\n\nexport FORCE_PROJECT=client # or hydra or something else\nexport FORCE_VERSION=$(cat /project/spec/$FORCE_PROJECT/latest) # or a specific version, e.g. v1.2.17\ncd /project\n\n./scripts/generate.sh\n./scripts/test.sh\n```\n\n## Commit a new spec\n\nPlace the spec in `spec/\u003cproject\u003e/\u003cversion\u003e.json` (e.g.\n`spec/hydra/v0.0.0-alpha.1.json`) and create a commit that references both the\nproject and the version `git commit -a -m \"Add spec for \u003cproject\u003e:\u003cversion\u003e\"`\n(e.g. `git commit -a -m \"Add spec for hydra:v0.0.0-alpha.1\"`).\n\n**Do not create multiple commits adding several specs in one PR,** as only the\nlatest commit will be checked when it lands on master.\n\nBecause this is an automated process, it is highly recommended to add, commit,\nand push the spec file directly to master in one go!\n\nYou can create a PR if you're making changes to the build chain.\n\n## Upgrading OpenAPI Generator\n\nUpgrading OpenAPI Generator versions requires careful upgrading of the Java\npom.xml. The file might contain new versions for dependencies, but if\noverwritten, will not work with the release pipeline.\n\nTherefore, the pom.xml file is being always overwritten from the contrib/poms\ndirectory for each project. To update any dependencies, the changes must thus be\nmade there. We recommend running the openapi generator manually on the local\nmachine and diffing the changes with contents in contrib/poms.\n\n## Publishing\n\n## PHP - Packagist\n\nInstall PHP and [composer](https://packagist.org). Then, run the install command\nto initialize everything:\n\n```shell script\nexport PROJECT=hydra\ncd clients/${PROJECT}/php\ncomposer install\n```\n\nThen, push the directory to a git remote of your choosing and also publish the\ntag you want to release the package as. You can take a look at\n[./scripts/publish.sh](./scripts/publish.sh) to understand how to accomplish\nthat.\n\n## Python - PyPi / pip\n\nFirst, install all the necessary tools and python3:\n\n```shell script\npython3 -m pip install --user --upgrade setuptools wheel twine\n```\n\nNext, create a PyPi account and [API Token](https://pypi.org/manage/account/)\nand set the env vars to:\n\n```shell script\nexport TWINE_USERNAME=__token__\nexport TWINE_PASSWORD=\u003ctoken\u003e\n```\n\nThen, publish the project (and set the project name):\n\n```shell script\nexport PROJECT=hydra\ncd clients/${PROJECT}/python\npython3 setup.py sdist bdist_wheel\npython3 -m twine upload dist/*\n```\n\n## Ruby\n\nYou need to set `GEM_HOST_API_KEY`\n\n## Java - Maven Central\n\nFor keys read https://blackdoor.github.io/blog/maven-cd/\n\nDue to a\n[bug in openapi-generator](https://github.com/OpenAPITools/openapi-generator/issues/3272)\nthat appears in Java11+, please disable javadoc generation:\n\n```shell\nmvn \u003ccmd\u003e -Dmaven.javadoc.skip=true\n```\n\nTo test the build for Java, run:\n\n```\n$ ./scripts/generate.sh\n$ cd clients/\u003cproject\u003e/java\n$ mvn test-compile\n```\n\nYou will also need a PGP keypair that is associated with one of the owners of\nthe `sh.ory` group and that is published on one of the public key servers. For\nmore details, see:\n[https://dzone.com/articles/publish-your-artifacts-to-maven-central](https://web.archive.org/web/20230324135530/https://dzone.com/articles/publish-your-artifacts-to-maven-central)\n\nor execute these steps:\n\n```sh\ngpg --full-gen-key\n\u003e Select RSA and RSA\n\u003e 4096\n\u003e 0 (does not expire)\n\n# The key ID is the pub key ID\n\u003e gpg –keyserver keys.pgp.net –send-key [KEY_ID]\n```\n\nOn macOS, use GPG Keychain as gpg `--full-gen-key` may run into issues.\n\n1. Use this value for `MVN_GPG_ASC_BASE64`:\n   `gpg --pinentry-mode loopback --export-secret-keys --armor $MVN_PGP_KEY_ID | base64 -w0 | pbcopy`\n2. Set `MVN_PGP_KEY_ID` to the value of the key ID (on MacOS you can find it in\n   the info section of GPG Keychain).\n3. Set `MVN_PGP_KEYNAME` to the value of the public key fingerprint.\n4. Set `MVN_PGP_PASSPHRASE` to the passphrase of the private key.\n\nThen, run the following commands:\n\n```shell script\nmvn clean\n\n# THESE VALUES ARE EXAMPLES - PLEASE PICK THE APPROPRIATE `tag`, etc\nmvn -Dtag=client-0.0.1-alpha.1 release:update-version \\\n  -DreleaseVersion=0.0.1-alpha.1 -DdevelopmentVersion=0.0.1-alpha.1-SNAPSHOT \\\n  -Darguments=\"-Dmaven.javadoc.skip=true\" -Dresume=false\n\nmvn release:perform -Darguments=\"-Dmaven.javadoc.skip=true\" -Dresume=false\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fory%2Fsdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fory%2Fsdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fory%2Fsdk/lists"}