[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EXZW364VG1PN3Y08M3JEE8":3,"skill-same:01M6EXZW364VG1PN3Y08M3JEE8":71},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":42,"linkOnly":43,"markdownContent":44,"markdownBody":45,"frontMatter":46,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":50,"repositoryHtmlUrl":51,"repositoryHomepageUrl":52,"ownerHtmlUrl":53,"ownerBlogUrl":54,"ownerDescription":55,"updatedAt":56,"install":57,"resources":70},"01M6EXZW364VG1PN3Y08M3JEE8","openapi-to-application-java-spring-boot",null,"Generate a Spring Boot (Java) application from an OpenAPI 3 specification using the spec-first approach: openapi-generator (Maven or Gradle) produces API interfaces and DTOs, you implement controllers, services, persistence, security and tests. Use when asked to build, scaffold or implement a Spring Boot API from an OpenAPI\u002FSwagger file.","github\u002Fawesome-copilot","github","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F9919?v=4","01M6AC83DS133TPXFSP1DHNCC6","GitHub","01M6AD3PBDYPK7NVFJNJ66Y8RS",41046,"MIT","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fopenapi-to-application-java-spring-boot\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41],"boot","openapi to application java spring boot","application","java spring","spring","openapi","spring boot","java","specification","when","you","generator","implement","tests","gradle","generate","build","services","use","api","first","file","maven","2026-11-10 10:12:30",false,"---\nname: openapi-to-application-java-spring-boot\ndescription: 'Generate a Spring Boot (Java) application from an OpenAPI 3 specification using the spec-first approach: openapi-generator (Maven or Gradle) produces API interfaces and DTOs, you implement controllers, services, persistence, security and tests. Use when asked to build, scaffold or implement a Spring Boot API from an OpenAPI\u002FSwagger file.'\n---\n\n# Spring Boot application from an OpenAPI spec\n\nSpec-first: the OpenAPI file is the source of truth. Generate **interfaces and DTOs only** at build time (never commit generated code), then hand-write the implementation. Verified with Spring Boot 4.0.8 and 4.1.1, openapi-generator 7.26.0 (Maven plugin, Gradle Groovy and Kotlin DSL), JDK 21+.\n\n## Step 0: Detect and gather\n\n- Existing `pom.xml` \u002F `build.gradle(.kts)`: keep its build tool and Spring Boot version, **never upgrade implicitly**, add the generator to it. Otherwise create the project with the `create-spring-boot-java-project` skill (dependencies: `web`, `validation`, `actuator`; add `data-jpa`, `postgresql`, `security` only if needed).\n- Get the spec (file, URL or pasted) and save it as `src\u002Fmain\u002Fresources\u002Fopenapi\u002F\u003Cname>.yaml`. Accept 3.0.x and 3.1.x; Swagger 2.0 must be converted first.\n- Ask only what the spec does not answer: persistence (in-memory vs database), authentication, package name.\n\n## Step 1: Review the spec\n\nCheck unique `operationId`s (they become method names), `tags` (they become one interface each), reusable `components\u002Fschemas`, `required` lists, validation constraints (`minLength`, `maximum`, `pattern`), error responses and `securitySchemes`. Flag gaps and fix the spec rather than the generated code.\n\n## Step 2: Configure the generator\n\nPin the version in a property; check the latest on Maven Central or the [generator docs](https:\u002F\u002Fopenapi-generator.tech\u002Fdocs\u002Fgenerators\u002Fspring) before changing it.\n\nMaven (`pom.xml`, in `\u003Cbuild>\u003Cplugins>`, before `spring-boot-maven-plugin`):\n\n```xml\n\u003Cplugin>\n  \u003CgroupId>org.openapitools\u003C\u002FgroupId>\n  \u003CartifactId>openapi-generator-maven-plugin\u003C\u002FartifactId>\n  \u003Cversion>${openapi-generator.version}\u003C\u002Fversion> \u003C!-- 7.26.0 -->\n  \u003Cexecutions>\n    \u003Cexecution>\n      \u003Cgoals>\u003Cgoal>generate\u003C\u002Fgoal>\u003C\u002Fgoals>\n      \u003Cconfiguration>\n        \u003CinputSpec>${project.basedir}\u002Fsrc\u002Fmain\u002Fresources\u002Fopenapi\u002Fpetstore.yaml\u003C\u002FinputSpec>\n        \u003CgeneratorName>spring\u003C\u002FgeneratorName>\n        \u003CapiPackage>com.example.petstore.api\u003C\u002FapiPackage>\n        \u003CmodelPackage>com.example.petstore.api.model\u003C\u002FmodelPackage>\n        \u003CgenerateSupportingFiles>false\u003C\u002FgenerateSupportingFiles>\n        \u003CconfigOptions>\n          \u003CinterfaceOnly>true\u003C\u002FinterfaceOnly>\n          \u003CrequestMappingMode>api_interface\u003C\u002FrequestMappingMode>\n          \u003CuseSpringBoot4>true\u003C\u002FuseSpringBoot4>\n          \u003CuseJackson3>true\u003C\u002FuseJackson3>\n          \u003CuseSpringBuiltInValidation>true\u003C\u002FuseSpringBuiltInValidation>\n          \u003CuseTags>true\u003C\u002FuseTags>\n          \u003CskipDefaultInterface>true\u003C\u002FskipDefaultInterface>\n          \u003CopenApiNullable>false\u003C\u002FopenApiNullable>\n          \u003CdocumentationProvider>none\u003C\u002FdocumentationProvider>\n          \u003CannotationLibrary>none\u003C\u002FannotationLibrary>\n        \u003C\u002FconfigOptions>\n      \u003C\u002Fconfiguration>\n    \u003C\u002Fexecution>\n  \u003C\u002Fexecutions>\n\u003C\u002Fplugin>\n```\n\nGradle (Groovy DSL; plugin `id 'org.openapi.generator' version '7.26.0'`):\n\n```groovy\nopenApiGenerate {\n  generatorName = 'spring'\n  inputSpec = \"$projectDir\u002Fsrc\u002Fmain\u002Fresources\u002Fopenapi\u002Fpetstore.yaml\".toString()\n  outputDir = layout.buildDirectory.dir('generated\u002Fopenapi').get().asFile.path\n  apiPackage = 'com.example.petstore.api'\n  modelPackage = 'com.example.petstore.api.model'\n  generateApiTests = false\n  generateModelTests = false\n  generateSupportingFiles = false\n  configOptions = [interfaceOnly: 'true', requestMappingMode: 'api_interface', useSpringBoot4: 'true', useJackson3: 'true', useSpringBuiltInValidation: 'true', useTags: 'true',\n    skipDefaultInterface: 'true', openApiNullable: 'false', documentationProvider: 'none', annotationLibrary: 'none']\n}\nsourceSets.main.java.srcDir layout.buildDirectory.dir('generated\u002Fopenapi\u002Fsrc\u002Fmain\u002Fjava')\ntasks.named('compileJava') { dependsOn 'openApiGenerate' }\n```\n\nGradle (Kotlin DSL; plugin `id(\"org.openapi.generator\") version \"7.26.0\"`, resolved from the Gradle plugin portal, so keep `gradlePluginPortal()` in `pluginManagement`):\n\n```kotlin\nopenApiGenerate {\n    generatorName.set(\"spring\")\n    inputSpec.set(\"$projectDir\u002Fsrc\u002Fmain\u002Fresources\u002Fopenapi\u002Fpetstore.yaml\")\n    outputDir.set(layout.buildDirectory.dir(\"generated\u002Fopenapi\").get().asFile.path)\n    apiPackage.set(\"com.example.petstore.api\")\n    modelPackage.set(\"com.example.petstore.api.model\")\n    generateApiTests.set(false)\n    generateModelTests.set(false)\n    generateSupportingFiles.set(false)\n    configOptions.set(mapOf(\"interfaceOnly\" to \"true\", \"requestMappingMode\" to \"api_interface\", \"useSpringBoot4\" to \"true\", \"useJackson3\" to \"true\", \"useSpringBuiltInValidation\" to \"true\", \"useTags\" to \"true\",\n        \"skipDefaultInterface\" to \"true\", \"openApiNullable\" to \"false\", \"documentationProvider\" to \"none\", \"annotationLibrary\" to \"none\"))\n}\nsourceSets.main { java.srcDir(layout.buildDirectory.dir(\"generated\u002Fopenapi\u002Fsrc\u002Fmain\u002Fjava\")) }\ntasks.compileJava { dependsOn(\"openApiGenerate\") }\n```\n\nOption notes:\n\n- **Spring Boot 3.x**: drop `useSpringBoot4` and `useJackson3` (`useSpringBoot3=true` is the default). Boot 4 needs both options; Jackson 3 is only allowed with `useSpringBoot4`.\n- **Request-parameter validation:** for Boot 3.2+\u002F4 (Framework 6.1+), keep `useSpringBuiltInValidation=true` in all build-tool configurations. It omits type-level `@Validated` from generated API interfaces so MVC handles constrained query\u002Fpath parameters through `HandlerMethodValidationException`. For Boot 3.0\u002F3.1, leave this option `false` to retain AOP validation and explicitly map request-parameter `ConstraintViolationException` to HTTP 400 with the spec's error body. Do not blanket-map service-layer constraint violations to 400. Never patch generated interfaces to change validation behavior.\n- **Base paths:** `requestMappingMode=api_interface` puts the class-level base-path mapping on the interface when no controller is generated. For `servers: [{url: \u002Fv1}]` and path `\u002Fpets`, verify `\u002Fv1\u002Fpets`; do not add the same `\u002Fv1` prefix again through controller mappings, `server.servlet.context-path` or proxy rewriting.\n- `interfaceOnly=true` generates `\u003CTag>Api` interfaces (with `@RequestMapping`\u002Fvalidation annotations) and models. `delegatePattern=true` (instead) generates controllers calling a `\u003CTag>ApiDelegate` you implement; prefer `interfaceOnly`, it is simpler. If you use `delegatePattern` (verified on Boot 4.1.1): drop `skipDefaultInterface` (it breaks the generated delegate, compile errors); generate only `ApiUtil.java` as supporting file, otherwise the default delegate methods fail with `cannot find symbol ApiUtil` and a full set of supporting files adds an `OpenApiGeneratorApplication` main class (`Unable to find a single main class` in `bootJar`): Maven `\u003CsupportingFilesToGenerate>ApiUtil.java\u003C\u002FsupportingFilesToGenerate>` instead of `\u003CgenerateSupportingFiles>false\u003C\u002FgenerateSupportingFiles>`, Gradle `globalProperties = [apis: '', models: '', supportingFiles: 'ApiUtil.java']`. The generated `\u003CTag>ApiController` is a `@Controller` in `apiPackage`: it must be under the `@SpringBootApplication` package (e.g. `com.example.demo.api`), otherwise it is not scanned and the endpoints return 404.\n- `documentationProvider=none` and `annotationLibrary=none` avoid pulling springdoc\u002Fswagger annotations into the generated code. Serving the spec\u002FSwagger UI is optional: add `org.springdoc:springdoc-openapi-starter-webmvc-ui` (3.x line for Boot 4, 2.8.x for Boot 3) only if requested; verified with springdoc 3.1.1 on Boot 4.1.1 (`\u002Fv3\u002Fapi-docs` returns OpenAPI 3.1 JSON, `\u002Fswagger-ui\u002Findex.html` returns 200).\n- `openApiNullable=false` avoids the `jackson-databind-nullable` dependency; keep it `true` only if the spec has PATCH semantics with nullable fields.\n- Generated models use `jakarta.validation`: `spring-boot-starter-validation` must be on the classpath. Required properties become constructor arguments **in generated order**; read the generated class in `target\u002Fgenerated-sources\u002Fopenapi` (or `build\u002Fgenerated\u002Fopenapi`) before calling constructors.\n- Use `\u003CimportMappings>`\u002F`\u003CtypeMappings>` only when a schema must map to an existing class.\n\n## Step 3: Implement\n\n- One `@RestController` per generated `\u003CTag>Api` interface, `implements` it, no extra mapping annotations (they are inherited from the interface). Keep controllers thin; put logic in `@Service` classes and return DTOs, not entities. Map entities to generated DTOs explicitly (a MapStruct mapper if the project already uses it).\n- Persistence: in-memory only when asked; otherwise Spring Data JPA entities and repositories separate from the generated DTOs, PostgreSQL via Docker Compose for dev, and schema handling per the schema management rule of the `java-hibernate-jpa` skill (Flyway or Liquibase for production). See the `java-springboot` skill.\n- Errors: use `@RestControllerAdvice` to preserve each operation's declared error status, media type and response schema, including validation failures. Handle `MethodArgumentNotValidException` for request bodies and, on Boot 3.2+\u002F4, `HandlerMethodValidationException` for query\u002Fpath parameters; override the corresponding handlers when extending `ResponseEntityExceptionHandler`. Return RFC 9457 `ProblemDetail` only when the spec declares it; otherwise return the declared error DTO instead of Spring's default validation response. If error responses are missing or ambiguous, ask before changing the contract rather than imposing Problem Details or a blanket 400\u002F404\u002F409 policy.\n- Security: map `securitySchemes` with the `spring-security` skill (JWT resource server, API key filter, method security). Do not generate `useSpringSecurityPreAuthorize` unless scopes are declared.\n- Never edit generated sources; change the spec or the generator options and rebuild.\n\n## Step 4: Test and verify\n\n- Follow the `spring-boot-testing` skill: `@WebMvcTest` slices per controller (mock the service), `@SpringBootTest` + MockMvc for the happy path and one validation failure per write operation, Testcontainers with `@ServiceConnection` for database code (see `java-testcontainers`).\n- Cover every operation in the spec: success, not found, invalid input. Test invalid constrained query\u002Fpath parameters as well as invalid request bodies. For error responses, including validation failures, assert the declared status, content type and body schema, not just the status code. Optionally assert the spec itself stays valid in CI with `openapi-generator validate -i \u003Cspec>` or by letting the build fail on generation errors.\n- Run `.\u002Fmvnw verify` or `.\u002Fgradlew build`, then start the app and `curl` one endpoint plus `\u002Factuator\u002Fhealth`. Include an endpoint from a spec with a non-root server URL and assert its full path, so a missing or duplicated base prefix is caught.\n- Report: spec issues found, generator version and options, files written, anything deferred.\n","# Spring Boot application from an OpenAPI spec\n\nSpec-first: the OpenAPI file is the source of truth. Generate **interfaces and DTOs only** at build time (never commit generated code), then hand-write the implementation. Verified with Spring Boot 4.0.8 and 4.1.1, openapi-generator 7.26.0 (Maven plugin, Gradle Groovy and Kotlin DSL), JDK 21+.\n\n## Step 0: Detect and gather\n\n- Existing `pom.xml` \u002F `build.gradle(.kts)`: keep its build tool and Spring Boot version, **never upgrade implicitly**, add the generator to it. Otherwise create the project with the `create-spring-boot-java-project` skill (dependencies: `web`, `validation`, `actuator`; add `data-jpa`, `postgresql`, `security` only if needed).\n- Get the spec (file, URL or pasted) and save it as `src\u002Fmain\u002Fresources\u002Fopenapi\u002F\u003Cname>.yaml`. Accept 3.0.x and 3.1.x; Swagger 2.0 must be converted first.\n- Ask only what the spec does not answer: persistence (in-memory vs database), authentication, package name.\n\n## Step 1: Review the spec\n\nCheck unique `operationId`s (they become method names), `tags` (they become one interface each), reusable `components\u002Fschemas`, `required` lists, validation constraints (`minLength`, `maximum`, `pattern`), error responses and `securitySchemes`. Flag gaps and fix the spec rather than the generated code.\n\n## Step 2: Configure the generator\n\nPin the version in a property; check the latest on Maven Central or the [generator docs](https:\u002F\u002Fopenapi-generator.tech\u002Fdocs\u002Fgenerators\u002Fspring) before changing it.\n\nMaven (`pom.xml`, in `\u003Cbuild>\u003Cplugins>`, before `spring-boot-maven-plugin`):\n\n```xml\n\u003Cplugin>\n  \u003CgroupId>org.openapitools\u003C\u002FgroupId>\n  \u003CartifactId>openapi-generator-maven-plugin\u003C\u002FartifactId>\n  \u003Cversion>${openapi-generator.version}\u003C\u002Fversion> \u003C!-- 7.26.0 -->\n  \u003Cexecutions>\n    \u003Cexecution>\n      \u003Cgoals>\u003Cgoal>generate\u003C\u002Fgoal>\u003C\u002Fgoals>\n      \u003Cconfiguration>\n        \u003CinputSpec>${project.basedir}\u002Fsrc\u002Fmain\u002Fresources\u002Fopenapi\u002Fpetstore.yaml\u003C\u002FinputSpec>\n        \u003CgeneratorName>spring\u003C\u002FgeneratorName>\n        \u003CapiPackage>com.example.petstore.api\u003C\u002FapiPackage>\n        \u003CmodelPackage>com.example.petstore.api.model\u003C\u002FmodelPackage>\n        \u003CgenerateSupportingFiles>false\u003C\u002FgenerateSupportingFiles>\n        \u003CconfigOptions>\n          \u003CinterfaceOnly>true\u003C\u002FinterfaceOnly>\n          \u003CrequestMappingMode>api_interface\u003C\u002FrequestMappingMode>\n          \u003CuseSpringBoot4>true\u003C\u002FuseSpringBoot4>\n          \u003CuseJackson3>true\u003C\u002FuseJackson3>\n          \u003CuseSpringBuiltInValidation>true\u003C\u002FuseSpringBuiltInValidation>\n          \u003CuseTags>true\u003C\u002FuseTags>\n          \u003CskipDefaultInterface>true\u003C\u002FskipDefaultInterface>\n          \u003CopenApiNullable>false\u003C\u002FopenApiNullable>\n          \u003CdocumentationProvider>none\u003C\u002FdocumentationProvider>\n          \u003CannotationLibrary>none\u003C\u002FannotationLibrary>\n        \u003C\u002FconfigOptions>\n      \u003C\u002Fconfiguration>\n    \u003C\u002Fexecution>\n  \u003C\u002Fexecutions>\n\u003C\u002Fplugin>\n```\n\nGradle (Groovy DSL; plugin `id 'org.openapi.generator' version '7.26.0'`):\n\n```groovy\nopenApiGenerate {\n  generatorName = 'spring'\n  inputSpec = \"$projectDir\u002Fsrc\u002Fmain\u002Fresources\u002Fopenapi\u002Fpetstore.yaml\".toString()\n  outputDir = layout.buildDirectory.dir('generated\u002Fopenapi').get().asFile.path\n  apiPackage = 'com.example.petstore.api'\n  modelPackage = 'com.example.petstore.api.model'\n  generateApiTests = false\n  generateModelTests = false\n  generateSupportingFiles = false\n  configOptions = [interfaceOnly: 'true', requestMappingMode: 'api_interface', useSpringBoot4: 'true', useJackson3: 'true', useSpringBuiltInValidation: 'true', useTags: 'true',\n    skipDefaultInterface: 'true', openApiNullable: 'false', documentationProvider: 'none', annotationLibrary: 'none']\n}\nsourceSets.main.java.srcDir layout.buildDirectory.dir('generated\u002Fopenapi\u002Fsrc\u002Fmain\u002Fjava')\ntasks.named('compileJava') { dependsOn 'openApiGenerate' }\n```\n\nGradle (Kotlin DSL; plugin `id(\"org.openapi.generator\") version \"7.26.0\"`, resolved from the Gradle plugin portal, so keep `gradlePluginPortal()` in `pluginManagement`):\n\n```kotlin\nopenApiGenerate {\n    generatorName.set(\"spring\")\n    inputSpec.set(\"$projectDir\u002Fsrc\u002Fmain\u002Fresources\u002Fopenapi\u002Fpetstore.yaml\")\n    outputDir.set(layout.buildDirectory.dir(\"generated\u002Fopenapi\").get().asFile.path)\n    apiPackage.set(\"com.example.petstore.api\")\n    modelPackage.set(\"com.example.petstore.api.model\")\n    generateApiTests.set(false)\n    generateModelTests.set(false)\n    generateSupportingFiles.set(false)\n    configOptions.set(mapOf(\"interfaceOnly\" to \"true\", \"requestMappingMode\" to \"api_interface\", \"useSpringBoot4\" to \"true\", \"useJackson3\" to \"true\", \"useSpringBuiltInValidation\" to \"true\", \"useTags\" to \"true\",\n        \"skipDefaultInterface\" to \"true\", \"openApiNullable\" to \"false\", \"documentationProvider\" to \"none\", \"annotationLibrary\" to \"none\"))\n}\nsourceSets.main { java.srcDir(layout.buildDirectory.dir(\"generated\u002Fopenapi\u002Fsrc\u002Fmain\u002Fjava\")) }\ntasks.compileJava { dependsOn(\"openApiGenerate\") }\n```\n\nOption notes:\n\n- **Spring Boot 3.x**: drop `useSpringBoot4` and `useJackson3` (`useSpringBoot3=true` is the default). Boot 4 needs both options; Jackson 3 is only allowed with `useSpringBoot4`.\n- **Request-parameter validation:** for Boot 3.2+\u002F4 (Framework 6.1+), keep `useSpringBuiltInValidation=true` in all build-tool configurations. It omits type-level `@Validated` from generated API interfaces so MVC handles constrained query\u002Fpath parameters through `HandlerMethodValidationException`. For Boot 3.0\u002F3.1, leave this option `false` to retain AOP validation and explicitly map request-parameter `ConstraintViolationException` to HTTP 400 with the spec's error body. Do not blanket-map service-layer constraint violations to 400. Never patch generated interfaces to change validation behavior.\n- **Base paths:** `requestMappingMode=api_interface` puts the class-level base-path mapping on the interface when no controller is generated. For `servers: [{url: \u002Fv1}]` and path `\u002Fpets`, verify `\u002Fv1\u002Fpets`; do not add the same `\u002Fv1` prefix again through controller mappings, `server.servlet.context-path` or proxy rewriting.\n- `interfaceOnly=true` generates `\u003CTag>Api` interfaces (with `@RequestMapping`\u002Fvalidation annotations) and models. `delegatePattern=true` (instead) generates controllers calling a `\u003CTag>ApiDelegate` you implement; prefer `interfaceOnly`, it is simpler. If you use `delegatePattern` (verified on Boot 4.1.1): drop `skipDefaultInterface` (it breaks the generated delegate, compile errors); generate only `ApiUtil.java` as supporting file, otherwise the default delegate methods fail with `cannot find symbol ApiUtil` and a full set of supporting files adds an `OpenApiGeneratorApplication` main class (`Unable to find a single main class` in `bootJar`): Maven `\u003CsupportingFilesToGenerate>ApiUtil.java\u003C\u002FsupportingFilesToGenerate>` instead of `\u003CgenerateSupportingFiles>false\u003C\u002FgenerateSupportingFiles>`, Gradle `globalProperties = [apis: '', models: '', supportingFiles: 'ApiUtil.java']`. The generated `\u003CTag>ApiController` is a `@Controller` in `apiPackage`: it must be under the `@SpringBootApplication` package (e.g. `com.example.demo.api`), otherwise it is not scanned and the endpoints return 404.\n- `documentationProvider=none` and `annotationLibrary=none` avoid pulling springdoc\u002Fswagger annotations into the generated code. Serving the spec\u002FSwagger UI is optional: add `org.springdoc:springdoc-openapi-starter-webmvc-ui` (3.x line for Boot 4, 2.8.x for Boot 3) only if requested; verified with springdoc 3.1.1 on Boot 4.1.1 (`\u002Fv3\u002Fapi-docs` returns OpenAPI 3.1 JSON, `\u002Fswagger-ui\u002Findex.html` returns 200).\n- `openApiNullable=false` avoids the `jackson-databind-nullable` dependency; keep it `true` only if the spec has PATCH semantics with nullable fields.\n- Generated models use `jakarta.validation`: `spring-boot-starter-validation` must be on the classpath. Required properties become constructor arguments **in generated order**; read the generated class in `target\u002Fgenerated-sources\u002Fopenapi` (or `build\u002Fgenerated\u002Fopenapi`) before calling constructors.\n- Use `\u003CimportMappings>`\u002F`\u003CtypeMappings>` only when a schema must map to an existing class.\n\n## Step 3: Implement\n\n- One `@RestController` per generated `\u003CTag>Api` interface, `implements` it, no extra mapping annotations (they are inherited from the interface). Keep controllers thin; put logic in `@Service` classes and return DTOs, not entities. Map entities to generated DTOs explicitly (a MapStruct mapper if the project already uses it).\n- Persistence: in-memory only when asked; otherwise Spring Data JPA entities and repositories separate from the generated DTOs, PostgreSQL via Docker Compose for dev, and schema handling per the schema management rule of the `java-hibernate-jpa` skill (Flyway or Liquibase for production). See the `java-springboot` skill.\n- Errors: use `@RestControllerAdvice` to preserve each operation's declared error status, media type and response schema, including validation failures. Handle `MethodArgumentNotValidException` for request bodies and, on Boot 3.2+\u002F4, `HandlerMethodValidationException` for query\u002Fpath parameters; override the corresponding handlers when extending `ResponseEntityExceptionHandler`. Return RFC 9457 `ProblemDetail` only when the spec declares it; otherwise return the declared error DTO instead of Spring's default validation response. If error responses are missing or ambiguous, ask before changing the contract rather than imposing Problem Details or a blanket 400\u002F404\u002F409 policy.\n- Security: map `securitySchemes` with the `spring-security` skill (JWT resource server, API key filter, method security). Do not generate `useSpringSecurityPreAuthorize` unless scopes are declared.\n- Never edit generated sources; change the spec or the generator options and rebuild.\n\n## Step 4: Test and verify\n\n- Follow the `spring-boot-testing` skill: `@WebMvcTest` slices per controller (mock the service), `@SpringBootTest` + MockMvc for the happy path and one validation failure per write operation, Testcontainers with `@ServiceConnection` for database code (see `java-testcontainers`).\n- Cover every operation in the spec: success, not found, invalid input. Test invalid constrained query\u002Fpath parameters as well as invalid request bodies. For error responses, including validation failures, assert the declared status, content type and body schema, not just the status code. Optionally assert the spec itself stays valid in CI with `openapi-generator validate -i \u003Cspec>` or by letting the build fail on generation errors.\n- Run `.\u002Fmvnw verify` or `.\u002Fgradlew build`, then start the app and `curl` one endpoint plus `\u002Factuator\u002Fhealth`. Include an endpoint from a spec with a non-root server URL and assert its full path, so a missing or duplicated base prefix is caught.\n- Report: spec issues found, generator version and options, files written, anything deferred.\n",{"name":5,"description":7},"main","61fa1fa8fcc63d6dbd2f07a75aeb8e214df5acfb","skills\u002Fopenapi-to-application-java-spring-boot",5340,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot","https:\u002F\u002Fawesome-copilot.github.com\u002F","https:\u002F\u002Fgithub.com\u002Fgithub","https:\u002F\u002Fgithub.com\u002Fabout","How people build software.","2026-11-11 13:41:32",{"source":8,"skillName":5,"commands":58,"prompt":68,"zipAvailable":69},[59,62,65],{"tool":60,"command":61},"npx","npx skills add github\u002Fawesome-copilot --skill openapi-to-application-java-spring-boot",{"tool":63,"command":64},"bunx","bunx skills add github\u002Fawesome-copilot --skill openapi-to-application-java-spring-boot",{"tool":66,"command":67},"pnpm","pnpm dlx skills add github\u002Fawesome-copilot --skill openapi-to-application-java-spring-boot","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fopenapi-to-application-java-spring-boot\u002FSKILL.md",true,[],[72,104,132,162,194,211],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":86,"publishedAt":42},"01M70KXZNX9ES38N2A8M58ZZMZ","supabase-rls-policies","Write, review, and test Supabase Row Level Security (RLS) policies so that one user cannot read or change another user's rows. Use when creating or changing tables, policies, views, or security definer functions in a Supabase project, when reviewing a migration that touches RLS, or when asked to prove user isolation with pgTAP tests that sign in as two users.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fsupabase-rls-policies\u002FSKILL.md",[78,83],{"categoryNo":79,"categoryName":80,"taxonomyType":81,"taxonomyTypeDesc":82},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",{"categoryNo":84,"categoryName":85,"taxonomyType":81,"taxonomyTypeDesc":82},"01JBSEEDCAT000000000000023","Skill与智能体开发",[87,88,89,90,91,28,92,93,94,95,96,97,98,99,32,100,37,101,102,103],"supabase","rls","supabase rls","supabase rls policies","project","review","change","read","write","security","isolation","tables","as","prove","users","functions","with",{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":111,"publishedAt":42},"01M70KWA5YWXDV6V8DZ19E3T2Y","skill-distribution-audit","Audit a skill collection before release or investigate installer omissions, archived\u002Ftemplate leakage, duplicate identities, and manifest drift. Reconcile the intended public source set, distribution manifest, and actual discovery output for a specified consumer version. Includes a deterministic set-comparison helper.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fskill-distribution-audit\u002FSKILL.md",[110],{"categoryNo":84,"categoryName":85,"taxonomyType":81,"taxonomyTypeDesc":82},[112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131],"distribution","skill distribution audit","audit","SET","deterministic","installer","for","discovery","comparison","helper","manifest","version","collection","drift","output","investigate","duplicate","template","release","reconcile",{"skillNo":133,"name":134,"nameZh":6,"description":135,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":136,"sourceHtmlUrl":137,"categories":138,"keywords":144,"publishedAt":42},"01M70KCJPFVW7PPQ49CC5R8JGK","logicapps-custom-code-net10-migration","Migrate Azure Logic Apps Standard local-function custom-code projects from .NET 8 to .NET 10. Use for legacy Logic Apps custom-code workspace upgrades, project\u002Fpackage configuration, custom-worker settings, publication, and integrated VS Code debugging. Not for ordinary .NET applications, standalone Azure Functions, Consumption workflows, or cloud deployment.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Flogicapps-custom-code-net10-migration\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Flogicapps-custom-code-net10-migration\u002FSKILL.md",[139],{"categoryNo":140,"categoryName":141,"taxonomyType":142,"taxonomyTypeDesc":143},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[145,146,147,148,149,150,118,91,151,152,153,154,155,156,157,37,158,159,160,161],"custom","code","logicapps custom code net10 migration","migration","projects","standalone","deployment","applications","local","azure","worker","upgrades","package","apps","Legacy","debugging","workflows",{"skillNo":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":166,"sourceHtmlUrl":167,"categories":168,"keywords":173,"publishedAt":42},"01M6AEBN37RQMXJ3298PEY7PG1","winmd-api-search","Find and explore Windows desktop APIs. Use when building features that need platform capabilities — camera, file access, notifications, UI controls, AI\u002FML, sensors, networking, etc. Discovers the right API for a task and retrieves full type details (methods, properties, events, enumeration values).","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fwinmd-api-search\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fwinmd-api-search\u002FSKILL.md",[169,172],{"categoryNo":170,"categoryName":171,"taxonomyType":81,"taxonomyTypeDesc":82},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":140,"categoryName":141,"taxonomyType":142,"taxonomyTypeDesc":143},[174,175,38,176,177,178,179,180,181,40,182,183,184,185,186,28,187,188,189,190,191,118,192,193],"winmd api search","search","windows","desktop","file access","enumeration","ui","ml","networking","capabilities","notifications","explore","access","features","full","camera","events","platform","methods","controls",{"skillNo":195,"name":196,"nameZh":6,"description":197,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":198,"licenseFileUrl":199,"sourceHtmlUrl":200,"categories":201,"keywords":207,"publishedAt":42},"01M6AE571R3SC1ZGE202B3NB5S","resemble-detect","Deepfake detection and media safety — detect AI-generated audio, images, video, and text, trace synthesis sources, apply watermarks, verify speaker identity, and analyze media intelligence using Resemble AI","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fresemble-detect\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fresemble-detect\u002FSKILL.md",[202,203,206],{"categoryNo":170,"categoryName":171,"taxonomyType":81,"taxonomyTypeDesc":82},{"categoryNo":204,"categoryName":205,"taxonomyType":81,"taxonomyTypeDesc":82},"01JBSEEDCAT000000000000016","图像与多媒体",{"categoryNo":84,"categoryName":85,"taxonomyType":81,"taxonomyTypeDesc":82},[208,115,40,209,210],"resemble detect","https","identity",{"skillNo":212,"name":213,"nameZh":6,"description":214,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":198,"licenseFileUrl":215,"sourceHtmlUrl":216,"categories":217,"keywords":222,"publishedAt":42},"01M6AE30BSK2HCY4TQQ22Z8JRD","quality-playbook","Run a complete quality engineering audit on any codebase. Derives behavioral requirements from the code, generates spec-traced functional tests, runs a three-pass code review with regression tests, executes a multi-model spec audit (Council of Three), and produces a consolidated bug report with TDD-verified patches. Finds the 35% of real defects that structural code review alone cannot catch. Works with any language. Trigger on 'quality playbook', 'spec audit', 'Council of Three', 'fitness-to-purpose', or 'coverage theater'.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fquality-playbook\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fquality-playbook\u002FSKILL.md",[218,221],{"categoryNo":219,"categoryName":220,"taxonomyType":81,"taxonomyTypeDesc":82},"01JBSEEDCAT000000000000007","代码审查",{"categoryNo":84,"categoryName":85,"taxonomyType":81,"taxonomyTypeDesc":82},[223,224,225,226,146,92,9,114,227,228,209,229,230,231,232,233,234,235,236,237,238,239,32,240,241,242,243],"playbook","quality playbook","quality","code review","tdd","run","report","spec","bug report","council","engineering","functional","spec audit","bug","verified","multi-model","three","coverage","model","regression","structural"]