{"id":20751172,"url":"https://github.com/openapitools/sbt-openapi-generator","last_synced_at":"2025-09-13T07:34:58.342Z","repository":{"id":45291789,"uuid":"244148241","full_name":"OpenAPITools/sbt-openapi-generator","owner":"OpenAPITools","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-25T07:48:48.000Z","size":82,"stargazers_count":35,"open_issues_count":9,"forks_count":39,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-25T07:59:18.525Z","etag":null,"topics":["hacktoberfest","openapi","openapi-generator","openapi2","openapi3","sbt","sbt-plugin","sbt-plugins","scala"],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpenAPITools.png","metadata":{"files":{"readme":"README.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-03-01T12:49:22.000Z","updated_at":"2025-08-25T07:47:50.000Z","dependencies_parsed_at":"2024-05-21T18:29:21.081Z","dependency_job_id":"bf10cb6d-5539-4aeb-b10e-b1f3f72cd476","html_url":"https://github.com/OpenAPITools/sbt-openapi-generator","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/OpenAPITools/sbt-openapi-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenAPITools%2Fsbt-openapi-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenAPITools%2Fsbt-openapi-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenAPITools%2Fsbt-openapi-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenAPITools%2Fsbt-openapi-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenAPITools","download_url":"https://codeload.github.com/OpenAPITools/sbt-openapi-generator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenAPITools%2Fsbt-openapi-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274935418,"owners_count":25376830,"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","status":"online","status_checked_at":"2025-09-13T02:00:10.085Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["hacktoberfest","openapi","openapi-generator","openapi2","openapi3","sbt","sbt-plugin","sbt-plugins","scala"],"created_at":"2024-11-17T08:31:29.795Z","updated_at":"2025-09-13T07:34:58.326Z","avatar_url":"https://github.com/OpenAPITools.png","language":"Scala","readme":"# sbt-openapi-generator\n\nA Sbt plugin to support the OpenAPI generator project.\n\n# Usage\n\nAdd to your `project/plugins.sbt`:\n\nFor new versions (7.14.0 or later), please use\n\n```sbt\naddSbtPugin(\"org.openapitools\" % \"sbt-openapi-generator_2.12_1.0\" % \"7.15.0\")\n```\n\nRef: https://central.sonatype.com/artifact/org.openapitools/sbt-openapi-generator_2.12_1.0\n\nFor old versions (e.g. 7.13.0), please use\n\n```sbt\naddSbtPlugin(\"org.openapitools\" % \"sbt-openapi-generator\" % \"7.13.0\")\n```\n\nRef: https://central.sonatype.com/artifact/org.openapitools/sbt-openapi-generator\n\n# Configuration\n\nConfiguration based on project module is recommended way to separate specifications by modules.\n\nYou must define one of the settings `openApiInputSpec` or `openApiConfigFile` to able run plugin to generate.\n\nSettings will be picked up from `openApiConfigFile` first if defined and then will be overwritten with module specified\nsettings if provided\n\nWith the next example module `generated` will be defined as:\n\n```sbt\nlazy val generated = project.in(file(\"generated\"))\n  .settings(\n    openApiInputSpec := \"openapi.yaml\",\n    openApiConfigFile := \"config.yaml\"\n  )\n```\n\nThere is a helpers to have boolean settings more readable. Instead of `Some(true)` it possible to do next:\n```sbt\n    openApiValidateSpec := SettingDisabled,\n    openApiGenerateModelTests := SettingEnabled,\n```\n# Execution\n\nTo print all available languages use\n```shell script\nsbt openApiGenerators\n```\n\nTo run template generation process\n```shell script\nsbt openApiGenerate\n```\nor per defined module\n```shell script\nsbt generated/openApiGenerate\n```\n\n# Settings\n\n\n| Setting  | Type   | Description              |\n|----------|--------|--------------------------|\n| openApiGeneratorName *| `String` | The name of the generator which will handle codegen. (see \\\"openApiGenerators\\\" task)\u003cbr\u003e Required. Can be provided as `generatorName` option of `openApiConfigFile` json config |\n| openApiInputSpec *| `String` | The Open API 2.0/3.x specification location (file or url)\u003cbr\u003e Required. Can be provided as `inputSpec` option of `openApiConfigFile` json config |\n| openApiOutputDir| `String` | The output target directory into which code will be generated |\n| openApiConfigFile **| `String` | Path to json configuration file\u003cbr\u003e This setting is required with `generatorName` and `inputSpec` settings provided if sbt settings `openApiGeneratorName` and `openApiInputSpec` are absent |\n| openApiAdditionalProperties | `Map[String, String]` | Sets additional properties that can be referenced by the mustache templates in the format of name=value,name=value. You can also have multiple occurrences of this option |\n| openApiGlobalProperties | `Map[String, String]` |Sets specified system properties |\n| openApiVerbose | `Option[Boolean]` | The verbosity of generation |\n| openApiValidateSpec | `Option[Boolean]` | Whether or not an input specification should be validated upon generation |\n| openApiTemplateDir | `String` | The template directory holding a custom template |\n| openApiAuth | `String` | Adds authorization headers when fetching the OpenAPI definitions remotely. Pass in a URL-encoded string of name:header with a comma separating multiple values |\n| openApiSkipOverwrite | `Option[Boolean]` | Specifies if the existing files should be overwritten during the generation |\n| openApiPackageName | `String` | Package for generated classes (where supported) |\n| openApiApiPackage | `String` | Package for generated api classes |\n| openApiModelPackage | `String` | Package for generated models |\n| openApiModelNamePrefix | `String` | Prefix that will be prepended to all model names |\n| openApiModelNameSuffix | `String` | Suffix that will be appended to all model names |\n| openApiInstantiationTypes | `Map[String, String]` | Sets instantiation type mappings |\n| openApiTypeMappings | `Map[String, String]` | Sets mappings between OpenAPI spec types and generated code types |\n| openApiServerVariables | `Map[String, String]` | Sets server variable for server URL template substitution, in the format of name=value,name=value. You can also have multiple occurrences of this option |\n| openApiLanguageSpecificPrimitives | `List[String]` | Specifies additional language specific primitive types in the format of type1,type2,type3,type3. For example: String,boolean,Boolean,Double |\n| openApiImportMappings | `Map[String, String]` | Specifies mappings between a given class and the import that should be used for that class |\n| openApiInvokerPackage | `String` | Root package for generated code |\n| openApiGroupId | `String` | groupId in generated pom.xml/build.sbt |\n| openApiId | `String` | artifactId in generated pom.xml/build.sbt. This also becomes part of the generated library's filename |\n| openApiLibrary | `String` | library template (sub-template) |\n| openApiGitHost | `String` |Git host, e.g. gitlab.com |\n| openApiGitUserId | `String` | Git user ID, e.g. openapitools |\n| openApiGitRepoId | `String` | Git repo ID, e.g. openapi-generator |\n| openApiReleaseNote | `String` | Release note, default to 'Minor update' |\n| openApiHttpUserAgent | `String` | HTTP user agent, e.g. codegen_csharp_api_client, default to 'OpenAPI-Generator/{packageVersion}}/{language}' |\n| openApiReservedWordsMappings | `Map[String, String]` | ](\"Specifies how a reserved name should be escaped to |\n| openApiIgnoreFileOverride | `String` | Specifies an override location for the .openapi-generator-ignore file. Most useful on initial generation. |\n| openApiRemoveOperationIdPrefix | `Option[Boolean]` | Remove prefix of operationId, e.g. config_getId =\u003e getId |\n| openApiApiFilesConstrainedTo | `List[String]` | Defines which API-related files should be generated. This allows you to create a subset of generated files (or none at all) |\n| openApiModelFilesConstrainedTo | `List[String]` | Defines which model-related files should be generated. This allows you to create a subset of generated files (or none at all) |\n| openApiSupportingFilesConstrainedTo | `List[String]` | Defines which supporting files should be generated. This allows you to create a subset of generated files (or none at all |\n| openApiGenerateModelTests | `Option[Boolean]` | Specifies that model tests are to be generated |\n| openApiGenerateModelDocumentation | `Option[Boolean]` | Defines whether or not model-related _documentation_ files should be generated |\n| openApiGenerateApiTests | `Option[Boolean]` | Specifies that api tests are to be generated |\n| openApiGenerateApiDocumentation | `Option[Boolean]` | Defines whether or not api-related _documentation_ files should be generated |\n| openApiWithXml | `Option[Boolean]` | A special-case setting which configures some generators with XML support. In some cases, this forces json OR xml, so the default here is false |\n| openApiLogToStderr | `Option[Boolean]` | To write all log messages (not just errors) to STDOUT |\n| openApiEnablePostProcessFile | `Option[Boolean]` | Enable post-processing file using environment variables | \\\n| openApiSkipValidateSpec | `Option[Boolean]` | To skip spec validation. When true, we will skip the default behavior of validating a spec before generation |\n| openApiGenerateAliasAsModel | `Option[Boolean]` | Generate model implementation for aliases to map and array schemas |\n| openApiGenerateMetadata | `Option[Boolean]` | Generate metadata files used by OpenAPI Generator. This includes `.openapi-generator-ignore` and any files within `.openapi-generator`. |\n\n# Examples\n\nPlease see [an sbt-test configuration](src/sbt-test) for examples of using the plugin.\nDo not run those examples directly, please copy them to separate place first.\n\n# Contribution and Tests\n\nWrite plugin integration tests under [src/sbt-test](src/sbt-test)\n\nExecute next command to run tests:\n\n```shell script\nsbt scripted\n```\n\nMore information about how to write and execute tests [is here](https://www.scala-sbt.org/1.x/docs/Testing-sbt-plugins.html)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenapitools%2Fsbt-openapi-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenapitools%2Fsbt-openapi-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenapitools%2Fsbt-openapi-generator/lists"}