{"id":24822216,"url":"https://github.com/kokuwaio/micronaut-openapi-codegen","last_synced_at":"2025-10-13T20:31:19.633Z","repository":{"id":38838099,"uuid":"227543435","full_name":"kokuwaio/micronaut-openapi-codegen","owner":"kokuwaio","description":"OpenAPI codegen for Micronaut","archived":false,"fork":false,"pushed_at":"2024-10-22T06:56:37.000Z","size":1560,"stargazers_count":39,"open_issues_count":3,"forks_count":16,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-10-23T09:54:54.317Z","etag":null,"topics":["codegen","micronaut","openapi"],"latest_commit_sha":null,"homepage":"","language":"Java","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/kokuwaio.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-12T07:11:50.000Z","updated_at":"2024-09-18T14:45:29.000Z","dependencies_parsed_at":"2023-11-13T07:26:04.467Z","dependency_job_id":"e5ee2878-960a-44da-a192-49b31abfffcf","html_url":"https://github.com/kokuwaio/micronaut-openapi-codegen","commit_stats":null,"previous_names":["sschnabe/micronaut-openapi-codegen"],"tags_count":83,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kokuwaio%2Fmicronaut-openapi-codegen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kokuwaio%2Fmicronaut-openapi-codegen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kokuwaio%2Fmicronaut-openapi-codegen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kokuwaio%2Fmicronaut-openapi-codegen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kokuwaio","download_url":"https://codeload.github.com/kokuwaio/micronaut-openapi-codegen/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236398939,"owners_count":19142667,"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":["codegen","micronaut","openapi"],"created_at":"2025-01-30T18:27:01.631Z","updated_at":"2025-10-13T20:31:19.628Z","avatar_url":"https://github.com/kokuwaio.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Micronaut Codegen\n\nOpenAPI code generator for Micronaut.\n\n[![maven](https://img.shields.io/maven-central/v/io.kokuwa.micronaut/micronaut-openapi-codegen.svg?label=maven)](https://central.sonatype.com/artifact/io.kokuwa.micronaut/micronaut-openapi-codegen)\n[![license](https://img.shields.io/badge/license-EUPL%201.2-blue)](https://git.kokuwa.io/kokuwaio/micronaut-openapi-codegen/src/branch/main/LICENSE)\n[![issues](https://img.shields.io/gitea/issues/open/kokuwaio/micronaut-openapi-codegen?gitea_url=https%3A%2F%2Fgit.kokuwa.io)](https://git.kokuwa.io/kokuwaio/micronaut-openapi-codegen/issues)\n[![prs](https://img.shields.io/gitea/pull-requests/open/kokuwaio/micronaut-openapi-codegen?gitea_url=https%3A%2F%2Fgit.kokuwa.io)](https://git.kokuwa.io/kokuwaio/micronaut-openapi-codegen/pulls)\n[![build](https://ci.kokuwa.io/api/badges/kokuwaio/micronaut-openapi-codegen/status.svg)](https://ci.kokuwa.io/repos/kokuwaio/micronaut-openapi-codegen/)\n\nInclude in your `pom.xml`:\n\n```xml\n\u003cplugin\u003e\n \u003cgroupId\u003eorg.openapitools\u003c/groupId\u003e\n \u003cartifactId\u003eopenapi-generator-maven-plugin\u003c/artifactId\u003e\n \u003cversion\u003e${version.org.openapitools.generator}\u003c/version\u003e\n \u003cexecutions\u003e\n  \u003cexecution\u003e\n   \u003cgoals\u003e\n    \u003cgoal\u003egenerate\u003c/goal\u003e\n   \u003c/goals\u003e\n  \u003c/execution\u003e\n \u003c/executions\u003e\n \u003cconfiguration\u003e\n  \u003cgeneratorName\u003emicronaut\u003c/generatorName\u003e\n  \u003coutput\u003e${project.build.directory}\u003c/output\u003e\n  \u003cinputSpec\u003esrc/resources//openapi/spec.yaml\u003c/inputSpec\u003e\n  \u003cpackageName\u003echangeMe\u003c/packageName\u003e\n \u003c/configuration\u003e\n \u003cdependencies\u003e\n  \u003cdependency\u003e\n   \u003cgroupId\u003eio.kokuwa.micronaut\u003c/groupId\u003e\n   \u003cartifactId\u003emicronaut-openapi-codegen\u003c/artifactId\u003e\n   \u003cversion\u003e${version.io.kokuwa.micronaut.codegen}\u003c/version\u003e\n  \u003c/dependency\u003e\n \u003c/dependencies\u003e\n\u003c/plugin\u003e\n```\n\n## Features\n\n* generate api interfaces (see [declarative client](https://docs.micronaut.io/latest/guide/index.html#clientAnnotation))\n* generate model objects with fluent and property accessors\n* generate interfaces for api tests based on method name and return code\n* generate client interfaces with micronaut **clientId**\n* add validation annotations\n* support for One-Of interfaces\n* support for additional properties with composed schemas\n* generate example instances of the model-objects\n* set a base class for all generated pojos, to allow extension with common functionality\n\n### Config options\n\n* clientId: id for generated clients (if no client id is provided no interface will be generated)\n* serdeable: add `@io.micronaut.serde.annotation.Serdeable` to models (default `true`)\n* dateTimeRelaxed: add type registrar for relaxed time converter (default `true`)\n* useBeanValidation: generate validation annotations (default `true`)\n* useGenericResponse: return generic container or specific model, e.g. `Model` vs. `HttpResponse\u003cModel\u003e` (default `true`)\n* useOptional: optional parameters are generated as `java.util.Optional` (default `true`)\n* openApiNullable: add container `JsonNullable` to model objects that are nullable (default `true`)\n* supportAsync: use reactivex return types, see [Reactive HTTP Request Processing](https://docs.micronaut.io/latest/guide/index.html#reactiveServer)\n* pagable: generate provider for pagable (default `false`)\n* generateExamples: generate example objects for the model, based on example and default values (default `false`)\n* generateConstants: generate constants for model names and api paths (default `false`)\n* generateAuthentication: generate Àuthentication into controller interfaces if response code 401 is present (default `false`)\n* sealed: generate sealed interfaces (default `true`)\n* record: generate records instead of pojos (default `false`)\n* modelBaseClass: set a base class that all generated pojos extend (default is unset)\n\nFor examples see [integration tests](src/it).\n\n### Null handling and default values\n\nJackson Inclusions:\n\n* `required=true` \u0026 `nullable=false`: `JsonInclude.ALWAYS`\n* `required=true` \u0026 `nullable=true`: `JsonInclude.ALWAYS`\n* `required=false` \u0026 `nullable=false`: `JsonInclude.NON_ABSENT`\n* `required=false` \u0026 `nullable=true`: `JsonInclude.NON_NULL`\n\nContainer (array/map):\n\n* `required=true` \u0026 `nullable=false`: empty containers are set as default value\n* `required=true` \u0026 `nullable=true`:  containers have no default value\n* `required=false` \u0026 `nullable=false`: containers have no default value\n* `required=false` \u0026 `nullable=true`: containers have no default value\n\nIf `jacksonDatabindNullable=true` is configured always `JsonNullable.undefined()` is set.\n\nDo not forget to add the dependency to `pom.xml`:\n\n```xml\n\u003cdependency\u003e\n \u003cgroupId\u003eorg.openapitools\u003c/groupId\u003e\n \u003cartifactId\u003ejackson-databind-nullable\u003c/artifactId\u003e\n \u003cversion\u003e0.2.6\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nAnd register [Jackson Module](https://github.com/OpenAPITools/jackson-databind-nullable):\n\n```java\n@Factory\npublic class ApplicationFactory {\n\n @Singleton\n JsonNullableModule jsonNullableModule() {\n  return new JsonNullableModule();\n }\n}\n```\n\n### Not supported\n\n* no project (e.g. `pom.xml`) is generated, only interfaces to implement\n* no support for java \u003c17\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkokuwaio%2Fmicronaut-openapi-codegen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkokuwaio%2Fmicronaut-openapi-codegen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkokuwaio%2Fmicronaut-openapi-codegen/lists"}