{"id":18498031,"url":"https://github.com/apivideo/api.video-api-client-generator","last_synced_at":"2025-10-11T16:36:41.385Z","repository":{"id":40263574,"uuid":"346020623","full_name":"apivideo/api.video-api-client-generator","owner":"apivideo","description":"Tool used to generate api.video's API clients, based on OpenAPI codegen","archived":false,"fork":false,"pushed_at":"2025-01-27T14:36:58.000Z","size":65177,"stargazers_count":24,"open_issues_count":5,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-23T19:44:45.079Z","etag":null,"topics":["client","java","maven","mustache-templates"],"latest_commit_sha":null,"homepage":"https://api.video","language":"Mustache","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/apivideo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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":"2021-03-09T13:45:08.000Z","updated_at":"2025-02-25T09:23:28.000Z","dependencies_parsed_at":"2023-10-04T20:50:15.142Z","dependency_job_id":"9d361d9c-2c5d-4647-909a-303083d17afd","html_url":"https://github.com/apivideo/api.video-api-client-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/apivideo%2Fapi.video-api-client-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apivideo%2Fapi.video-api-client-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apivideo%2Fapi.video-api-client-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apivideo%2Fapi.video-api-client-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apivideo","download_url":"https://codeload.github.com/apivideo/api.video-api-client-generator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247949717,"owners_count":21023374,"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":["client","java","maven","mustache-templates"],"created_at":"2024-11-06T13:37:14.508Z","updated_at":"2025-10-11T16:36:36.341Z","avatar_url":"https://github.com/apivideo.png","language":"Mustache","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![badge](https://img.shields.io/twitter/follow/api_video?style=social)](https://twitter.com/intent/follow?screen_name=api_video) \u0026nbsp; [![badge](https://img.shields.io/github/stars/apivideo/api.video-api-client-generator?style=social)](https://github.com/apivideo/api.video-api-client-generator) \u0026nbsp; [![badge](https://img.shields.io/discourse/topics?server=https%3A%2F%2Fcommunity.api.video)](https://community.api.video)\n![](https://github.com/apivideo/.github/blob/main/assets/apivideo_banner.png)\n\u003ch1 align=\"center\"\u003eapi.video API client generator\u003c/h1\u003e\n\n[api.video](https://api.video/) is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managing on-demand \u0026 low latency live streaming features in your app.\n\n\n# Table of contents\n\n- [Table of contents](#table-of-contents)\n- [Project description](#project-description)\n- [Getting started](#getting-started)\n  - [Requirements](#requirements)\n  - [Usage](#usage)\n- [Documentation](#documentation)\n  - [Supported languages](#supported-languages)\n  - [Template files](#template-files)\n  - [Configuration files](#configuration-files)\n  - [Generator sub-class](#generator-sub-class)\n  - [Development](#development)\n    - [Configuration](#configuration)\n      - [CLI](#cli)\n      - [File](#file)\n\n# Project description\n\nAPI client generation tool based on [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator). Generates client source code in several languages based on [mustache templates](https://mustache.github.io/).\n\n\n# Getting started\n\n## Requirements\n\n- Java 1.8+\n- Maven\n\n## Usage\n\nTo generate an API client:\n\n```sh\nmvn package -P [profile]\n```\n\nTo see the list of available profiles, see the \"profile\" column in the table of [supported languages](#supported-languages). \n\n\u003ca name=\"supported-languages\"\u003e\u003c/a\u003e\n\n# Documentation \n\n## Supported languages\n\n| Language          | Profile          | CI tests           | CI package release | Repository                                                                       |\n|-------------------|------------------|--------------------|--------------------|----------------------------------------------------------------------------------|\n| Java              | java             | :white_check_mark: | :white_check_mark: | [java-api-client](https://github.com/apivideo/api.video-java-client)             |\n| Android           | android          | :white_check_mark: | :white_check_mark: | [android-api-client](https://github.com/apivideo/api.video-android-client)       |\n| Android           | android-uploader | :white_check_mark: | :white_check_mark: | [android-video-uploader](https://github.com/apivideo/api.video-android-uploader) |\n| NodeJs/Typescript | nodejs           | :white_check_mark: | :white_check_mark: | [nodejs-api-client](https://github.com/apivideo/api.video-nodejs-client)         |\n| Php               | php              | :white_check_mark: | -                  | [php-api-client](https://github.com/apivideo/api.video-php-client)               |\n| C#                | csharp           | :white_check_mark: | :white_check_mark: | [csharp-api-client](https://github.com/apivideo/api.video-csharp-client)         |\n| Go                | go               | :white_check_mark: | -                  | [go-api-client](https://github.com/apivideo/api.video-go-client)                 |\n| Python            | python           | :white_check_mark: | :white_check_mark: | [python-api-client](https://github.com/apivideo/api.video-python-client)         |\n| Swift5            | swift5           | :white_check_mark: | :white_check_mark: | [ios-api-client](https://github.com/apivideo/api.video-ios-client)               |\n| Swift5            | swift5-uploader  | :white_check_mark: | :white_check_mark: | [ios-video-uploader](https://github.com/apivideo/api.video-ios-uploader)         |\n\n\n## Template files\n\nMustache template files can be found in `templates/[profile]`.\n\nTemplates are based on default OpenAPI Generator [templates](https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator/src/main/resources).\n\n## Configuration files  \n\nEach target language has it's own configuration file located at `config/[profile].yaml`.\n\n```yml\napiPackage: video.api.client.api.clients # API files output folder\nmodelPackage: folder.subfolder.subsubfolder # model output folder\nfiles:\n  page.mustache:\n    folder: src/main/java/video/api/client/api/models\n    destinationFilename: Page.java\n  ApiVideoAuthInterceptor.mustache:\n    folder: src/main/java/video/api/client/api/auth\n    destinationFilename: ApiVideoAuthInterceptor.java\n  EmptyArrayFixTypeAdapterFactory.mustache:\n    folder: src/main/java/video/api/client/api\n    destinationFilename: EmptyArrayFixTypeAdapterFactory.java\n  UploadChunkRequestBody.mustache:\n    folder: src/main/java/video/api/client/api/upload\n    destinationFilename: UploadChunkRequestBody.java\n  UploadProgressListener.mustache:\n    folder: src/main/java/video/api/client/api/upload\n    destinationFilename: UploadProgressListener.java\n  ApiVideoClient.mustache:\n    folder: src/main/java/video/api/client\n    destinationFilename: ApiVideoClient.java\n  pagination.md.mustache:\n    folder: docs\n    destinationFilename: Pagination.md\n  post-generate.sh:\n    destinationFilename: post-generate.sh\n```\n\n\u003e - https://openapi-generator.tech/docs/globals/\n\u003e - https://openapi-generator.tech/docs/configuration/\n\u003e - https://openapi-generator.tech/docs/customization#user-defined-templates\n\u003e - https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java#L106-L111\n\n\n## Generator sub-class\n\nSome target language require tweaks that can't be done through the config file or the templates. In this case, a subclass of the generator is created at `apivideo-generator/src/main/java/video/api/client/generator/[pascal-case-profile].java`.  \n\n## Development\n\nWe recommend the usage of a dedicated [Java IDE](https://en.wikipedia.org/wiki/Comparison_of_integrated_development_environments#Java) to work on the development of this project.\nEspecially if you want to tweak one of the language specific `Codegen` written in `Java` you'll need to navigate through the class hierarchy.\n\n### Configuration\n\nA `CodegenConfigurator` instance is built from configurations coming from:\n  - the `CLI`\n  - a `yml` configuration file.\n\nThis `CodegenConfigurator` is then turned into a `ClientOptInput` (via the `toClientOptInput` method) to be fed to a `Generator`.\n\u003e __This is when our custom codegen, which implements `CodegenConfig` interface is involved.__\n\nThe generation is actually done by the `generate` method of the `DefaultGenerator` class.\nThis method will mainly :\n- `processUserDefinedTemplates`\n- `generateModels` given the list of `files` and available `models`\n- `generateApis` given the list of `files` and available `operations`\n- `generateSupportingFiles` given available `models` and `operations`\n\n#### CLI\n\nThe profile configuration is first read from `pom.xml`, see java for example :\n```xml\n\u003cprofile\u003e\n    \u003cid\u003ejava\u003c/id\u003e\n    \u003cproperties\u003e\n        \u003cfolder\u003ejava\u003c/folder\u003e\n        \u003cgeneratorName\u003evideo.api.client.generator.Java\u003c/generatorName\u003e\n        \u003cpostGenerationScript\u003e./post-generate.sh\u003c/postGenerationScript\u003e\n    \u003c/properties\u003e\n\u003c/profile\u003e\n```\n\nWhen generating a client with the following command:\n```\nmvn package -P [profile]\n```\n\nInternally the `generate` command of the `openapi-generator-cli` run with the following options:\n```xml\n\u003cconfiguration\u003e\n    \u003cinputSpec\u003eoas_apivideo.yaml\u003c/inputSpec\u003e\n    \u003cgeneratorName\u003e${generatorName}\u003c/generatorName\u003e\n    \u003ctemplateDirectory\u003e${project.basedir}/templates/${folder}\u003c/templateDirectory\u003e\n    \u003cconfigurationFile\u003e${project.basedir}/config/${folder}.yaml\u003c/configurationFile\u003e\n    \u003coutput\u003egenerated-clients/${folder}\u003c/output\u003e\n\u003c/configuration\u003e\n```\n\n#### File\n\nThe `yml` config file -- is loaded in the `CodegenConfigurator` class via the `fromFile` method.\n\u003e A class which manages the contextual configuration for code generation. \n\u003e This includes configuring the generator, templating, and the workflow which orchestrates these. \n\u003e \n\u003e This helper also enables the deserialization of `GeneratorSettings` via application-specific Jackson JSON usage (see `DynamicSettings`.\n\nEach entry under the `files` key of the `yml` configuration file is used to build a `TemplateDefinition` object.\nIf not specified otherwise the file is treated as a `SupportingFile`.\n\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapivideo%2Fapi.video-api-client-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapivideo%2Fapi.video-api-client-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapivideo%2Fapi.video-api-client-generator/lists"}