{"id":13500985,"url":"https://github.com/pulp/pulp-openapi-generator","last_synced_at":"2025-03-29T07:32:12.302Z","repository":{"id":39856231,"uuid":"181067663","full_name":"pulp/pulp-openapi-generator","owner":"pulp","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-26T11:29:53.000Z","size":176,"stargazers_count":4,"open_issues_count":9,"forks_count":25,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-24T09:03:07.622Z","etag":null,"topics":["openapi","pulp"],"latest_commit_sha":null,"homepage":null,"language":"Mustache","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pulp.png","metadata":{"files":{"readme":"README.rst","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,"publiccode":null,"codemeta":null}},"created_at":"2019-04-12T18:59:47.000Z","updated_at":"2025-02-26T11:29:57.000Z","dependencies_parsed_at":"2024-02-14T23:31:16.228Z","dependency_job_id":"51f02c9b-c109-407e-8354-c351fede6a47","html_url":"https://github.com/pulp/pulp-openapi-generator","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulp%2Fpulp-openapi-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulp%2Fpulp-openapi-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulp%2Fpulp-openapi-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pulp%2Fpulp-openapi-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pulp","download_url":"https://codeload.github.com/pulp/pulp-openapi-generator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246155998,"owners_count":20732355,"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":["openapi","pulp"],"created_at":"2024-07-31T22:01:21.490Z","updated_at":"2025-03-29T07:32:11.931Z","avatar_url":"https://github.com/pulp.png","language":"Mustache","funding_links":[],"categories":["Mustache"],"sub_categories":[],"readme":"pulp-openapi-generator\n======================\n\nThis repository provides a script that helps generate Python and Ruby bindings for pulpcore or any of it's\nplugins.\n\nThe first time the script is run, a docker container with openapi-generator-cli is downloaded. All\nsubsequent runs will re-use the container that was downloaded on the initial run.\n\nRequirements\n------------\n - Pulp 3 running on localhost:24817\n - Docker\n\nGenerating bindings\n-------------------\n\nThe ``generate.sh`` script takes three positional arguments: module name, language, and version.\nWhen the optional version parameter is provided, it is used as the version string. When it is not\nprovided, the version reported by Pulp's status API is used. The following commands should be used\nto generate Python bindings for ``pulpcore``:\n\n.. code-block:: bash\n\n    sudo ./generate.sh pulpcore python\n\nThis command will generate a python package inside ``pulpcore-client`` directory.\n\nRuby bindings for the RPM plugin can be generated with the following command:\n\n.. code-block:: bash\n\n    sudo ./generate.sh pulp_rpm ruby\n\nThis command will generate a Ruby Gem inside ``pulp_rpm-client`` directory.\n\nThe packages generated will have the same version as what is reported by the status API.\n\nThis command will generate a Ruby Gem with '3.0.0rc1.dev.10' version.\n\n.. code-block:: bash\n\n    sudo ./generate.sh pulp_rpm ruby 3.0.0rc1.dev.10\n\nGenerating Bindings Against Re-Rooted Systems\n---------------------------------------------\n\nDuring bindings generation the openapi schema is fetched. Use the ``PULP_API_ROOT`` environment\nvariable to instruct the bindings generator where the root of the API is located. For example, the\ndefault ``export PULP_API_ROOT=\"/pulp/\"`` is the default root, which then serves the api.json at\n``/pulp/api/v3/docs/api.json``.\n\nGenerating Bindings Against Remote Systems\n------------------------------------------\n\nDuring bindings generation the openapi schema is fetched. Use the ``PULP_API`` environment\nvariable to instruct the bindings generator to use a Pulp API on a different host and/or port.\nFor example, ``export PULP_API=\"http://localhost:24817\"`` are the default host and port, which\nresults in the bindings generator talking to the Pulp API at\n``http://localhost:24817/pulp/api/v3/docs/api.json``.\n\nGenerating Bindings Using a Local Openapi Schema\n-----------------------------------------------\n\nIf you want to use a locally present openapi schema, you can skip fetching the openapi schema\nby setting the ``USE_LOCAL_API_JSON`` environment variable. Doing so you have to manually provide the\n``api.json`` file containing the openapi schema in the current working directory.\n\nGenerate Bindings Using Docker in Docker (dind)\n-----------------------------------------------\n\nBindings are generated using the openapi-generator-cli docker container. If your environment itself runs in\na docker container, the openapi-generator-cli container has to be started as a sibling container. For\nsibling containers, volumes cannot be mounted as usual. They have to be passed through from the parent\ncontainer. For this to work you have to set the ``PARENT_CONRAINER_ID`` environment variable to specify the\nparent container in a dind environment.\n\nGenerating Bindings on a Filesystem Shared With Another Container\n-----------------------------------------------------------------\n\nWhen the bindings are being generated so that they can be installed inside another container, it\nmay be necessary to set the MCS label on the openapi-generator-cli container to match the MCS label\nof the other container. Users can set the $PULP_MCS_LABEL environment variable (e.g. s0:c1,c2).\nWhen this variable is present, the container for `openapi-generator-cli` will be started with this\nMCS label. This only applies to systems that are using `podman` and SELinux is `Enforcing`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpulp%2Fpulp-openapi-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpulp%2Fpulp-openapi-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpulp%2Fpulp-openapi-generator/lists"}