{"id":15801804,"url":"https://github.com/christianhelle/refitter-action","last_synced_at":"2025-06-15T11:39:40.619Z","repository":{"id":165467797,"uuid":"640287071","full_name":"christianhelle/refitter-action","owner":"christianhelle","description":"Generate Refit API Client using Refitter","archived":false,"fork":false,"pushed_at":"2023-12-15T02:16:05.000Z","size":80,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-19T05:16:11.694Z","etag":null,"topics":["openapi","openapi3","refit","rest","swagger"],"latest_commit_sha":null,"homepage":"https://github.com/christianhelle/refitter","language":null,"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/christianhelle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"christianhelle","patreon":null,"open_collective":null,"ko_fi":"christianhelle","tidelift":null,"community_bridge":null,"liberapay":"christianhelle","issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":["https://paypal.me/christianhelle","https://buymeacoffee.com/christianhelle"]}},"created_at":"2023-05-13T15:34:09.000Z","updated_at":"2023-05-15T20:33:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"dce02fe2-db0b-4c0e-b571-ac953a0594d8","html_url":"https://github.com/christianhelle/refitter-action","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/christianhelle/refitter-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christianhelle%2Frefitter-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christianhelle%2Frefitter-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christianhelle%2Frefitter-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christianhelle%2Frefitter-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/christianhelle","download_url":"https://codeload.github.com/christianhelle/refitter-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christianhelle%2Frefitter-action/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259967857,"owners_count":22939538,"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","openapi3","refit","rest","swagger"],"created_at":"2024-10-05T01:40:49.492Z","updated_at":"2025-06-15T11:39:40.590Z","avatar_url":"https://github.com/christianhelle.png","language":null,"funding_links":["https://github.com/sponsors/christianhelle","https://ko-fi.com/christianhelle","https://liberapay.com/christianhelle","https://paypal.me/christianhelle","https://buymeacoffee.com/christianhelle"],"categories":[],"sub_categories":[],"readme":"# Refitter Github Action\nGenerate a Refit client interface and contracts from an OpenAPI specifications document using [Refitter](https://github.com/christianhelle/refitter).\n\n## Inputs\n\n### `openapi-file`\nThe path to the OpenAPI document (both JSON and YAML are supported). Defaults to \"openapi.json\" (i.e. a file in the current directory called openapi.json). Paths that do not start with `/` are assumed to be relative to the root of the repository.\n\n### `openapi-url`\nThe URL to load the OpenAPI document from. If set, `openapi-file` will be ignored.\n\n### `namespace`\nThe default namespace used for the generated types (default: `GeneratedCode`)\n\n### `use-api-response`\nReturn `Task\u003cIApiResponse\u003cT\u003e\u003e` instead of `Task\u003cT\u003e`\n\n### `cancellation-tokens`\nUse cancellation tokens\n\n### `command-args`\nAdditional arguments to pass through to the [Refitter](https://github.com/christianhelle/refitter) CLI tool.\n\n### `publish-artifacts`\nSetting this will publish the generated code as C# files as build artifacts\n\n### `client-sdk`\nSetting this will package the generated code into a NuGet package and publish this as a build artifact. The following inputs are ***Required*** when `client-sdk` is enabled\n\n- ### `client-sdk-version` - The version number used for the NuGet package (default: `1.0.${{ github.run_number }}`)\n- ### `client-sdk-target-framework` - The target framework used in the generated Client SDK (default: `net6.0`)\n- ### `client-sdk-package-id` - The value used as `\u003cPackageId\u003e` for package the generated code into a NuGet package\n- ### `client-sdk-title` - The value used as `\u003cTitle\u003e` for package the generated code into a NuGet package\n- ### `client-sdk-root-namespace` - The value used as `\u003cRootNamespace\u003e` for package the generated code into - a NuGet package\n- ### `client-sdk-assembly` - The value used as `\u003cAssemblyName\u003e` for package the generated code into a - NuGet package\n- ### `client-sdk-authors` - The value used as `\u003cAuthors\u003e` for package the generated code into a NuGet - package\n- ### `client-sdk-company` - The value used as `\u003cCompany\u003e` for package the generated code into a NuGet - package\n- ### `client-sdk-product` - The value used as `\u003cProduct\u003e` for package the generated code into a NuGet - package\n- ### `client-sdk-description` - The value used as `\u003cDescription\u003e` for package the generated code into a - NuGet package\n- ### `client-sdk-license` - The value used as `\u003cPackageLicenseExpression\u003e` for package the generated code - into a NuGet package\n- ### `client-sdk-project-url` - The value used as `\u003cPackageProjectUrl\u003e` and `\u003cRepositoryUrl\u003e` for package - the generated code into a NuGet package\n- ### `client-sdk-repository-type` - The value used as `\u003cRepositoryType\u003e` for package the generated code into a NuGet package\n\n## Outputs\nNo outputs are returned. The generated client is placed in the current directory and called **Output.cs** which contains both the Refit interface and the contract types used by the API\n\n\n# Examples\n\n### Using a File for OpenAPI specifications document\n\n```yaml\njobs:\n  smoke-test-url:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v3\n      \n      # Use the action to generate a Refit client interface\n      # This produces a file called Output.cs as a build artifact\n      - uses: christianhelle/refitter-action@main\n        name: Generate Refit Client\n        with:        \n          openapi-file: openapi.json\n          namespace: ChristianHelle.Examples.Petstore.v3\n      \n      # Do something with the generated client (like include it in an existing project)\n      - run: Get-Content Output.cs | Write-Host\n        shell: pwsh\n```\n\n### Using a URL and producing a Client SDK NuGet package\n\n```yaml\njobs:\n  smoke-test-url-with-client-sdk:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v3\n      \n      # Use the action to generate a Refit client interface\n      # This produces a NuGet package as a build artifact\n      - uses: christianhelle/refitter-action@main\n        name: Generate Refit Client SDK\n        with:\n          openapi-url: https://petstore3.swagger.io/api/v3/openapi.json\n          namespace: ChristianHelle.Examples.Petstore.v3\n          client-sdk: true\n          client-sdk-version: 3.0.${{ github.run_number }}\n          client-sdk-package-id: ChristianHelle.Examples.Petstore.v3\n          client-sdk-title: ChristianHelle.Examples.Petstore.v3\n          client-sdk-root-namespace: ChristianHelle.Examples.Petstore.v3\n          client-sdk-assembly: ChristianHelle.Examples.Petstore.v3\n          client-sdk-product: ChristianHelle.Examples.Petstore.v3\n          client-sdk-authors: Christian Resma Helle\n          client-sdk-company: Christian Resma Helle\n          client-sdk-description: Example generated code using Refitter and the Swagger Petstore v3 example OpenAPI specifications\n          client-sdk-project-url: https://github.com/christianhelle/refitter-action\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristianhelle%2Frefitter-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchristianhelle%2Frefitter-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristianhelle%2Frefitter-action/lists"}