gpt4 book ai didi

java - Gradle 构建文件 org.openapi.generator openApiGenerate 列表生成器 openApiGenerators 无输出 无错误

转载 作者:行者123 更新时间:2023-12-01 16:50:58 28 4
gpt4 key购买 nike

我的 build.gradle 文件中有以下配置

plugins {
id 'java'
id 'org.openapi.generator' version '4.1.3'
}

repositories {
maven { url "https://mavenrepo.schwab.com/nexus/content/groups/public" }
maven { url "https://mavenrepo.schwab.com/nexus/content/repositories/releases/" }
mavenCentral()
jcenter()
}

sourceSets.main.java.srcDirs += "$buildDir/generated/src/main/java"

openApiGenerate {
generatorName = "java"
inputSpec = "$rootDir/API/POMOrchestrator.v1.json".toString()
outputDir = "$rootDir/application/".toString()
apiPackage = "com.schwab.brokerage.party.onborading.api.inbound.rest.controller"
invokerPackage = "com.schwab.brokerage.party.onborading"
modelPackage = "com.schwab.brokerage.party.onborading.models.swagger"
modelNamePrefix = "Party"
configOptions = [
dateLibrary: "java8-localdatetime"
]

}

compileJava.dependsOn tasks.openApiGenerate

当我执行以下命令时

gradle openApiGenerators --warning-mode all

我得到以下输出,没有错误(明显错误,因为我认为它不喜欢我的生成器名称),没有输出类。

> Configure project :
Using method ObjectFactory.property() method to create a property of type Map<K, V> has been deprecated. This will fail with an error in Gradle 6.0. Please use the Ob
jectFactory.mapProperty() method instead.

> Task :openApiGenerators
The following generators are available:

CLIENT generators:
- ada
- android
- apex
- bash
- c
- clojure
- cpp-qt5-client
- cpp-restsdk
- cpp-tizen
- csharp
- csharp-netcore
- dart
- dart-jaguar
- eiffel
- elixir
- elm
- erlang-client
- erlang-proper
- flash
- go
- go-experimental (experimental)
- groovy
- haskell-http-client
- java
- javascript
- javascript-closure-angular
- javascript-flowtyped
- jaxrs-cxf-client
- jmeter
- kotlin
- lua
- nim (beta)
- objc
- ocaml
- perl
- php
- powershell
- python
- python-experimental (experimental)
- r
- ruby
- rust
- scala-akka
- scala-gatling
- scalaz
- swift4
- typescript-angular
- typescript-angularjs
- typescript-aurelia
- typescript-axios
- typescript-fetch
- typescript-inversify
- typescript-jquery
- typescript-node
- typescript-rxjs


SERVER generators:
- ada-server
- aspnetcore
- cpp-pistache-server
- cpp-qt5-qhttpengine-server
- cpp-restbed-server
- csharp-nancyfx
- erlang-server
- fsharp-functions (beta)
- fsharp-giraffe-server (beta)
- go-gin-server
- go-server
- graphql-nodejs-express-server
- haskell
- java-inflector
- java-msf4j
- java-pkmst
- java-play-framework
- java-undertow-server
- java-vertx
- jaxrs-cxf
- jaxrs-cxf-cdi
- jaxrs-cxf-extended
- jaxrs-jersey
- jaxrs-resteasy
- jaxrs-resteasy-eap
- jaxrs-spec
- kotlin-server
- kotlin-spring
- kotlin-vertx (beta)
- nodejs-express-server (beta)
- php-laravel
- php-lumen
- php-silex
- php-slim
- php-symfony
- php-ze-ph
- python-aiohttp
- python-blueplanet
- python-flask
- ruby-on-rails
- ruby-sinatra
- rust-server
- scala-finch
- scala-lagom-server
- scala-play-server
- scalatra
- spring


DOCUMENTATION generators:
- asciidoc
- cwiki
- dynamic-html
- html
- html2
- openapi
- openapi-yaml


SCHEMA generators:
- avro-schema (beta)
- mysql-schema


CONFIG generators:
- apache2
- graphql-schema
- protobuf-schema (beta)


OTHER generators:





BUILD SUCCESSFUL in 2s
1 actionable task: 1 executed

第一次尝试这个,不知道哪里出了问题。

最终我想让这个工作正常,然后指定模板,以便我可以添加 lombok 注释(如本问题 Gradle Swagger CodeGen DefaultGenerator CodegenConfigurator Add Lombok 中所述,但尚未回答)。但是,我必须首先让代码生成工作。

最佳答案

我调用了错误的方法。 openApiGenerators 只是列出了它正在做的事情的生成器。要生成输出,您必须调用上面创建的任务 openApiGenerate。感谢@philonous 的回答。

关于java - Gradle 构建文件 org.openapi.generator openApiGenerate 列表生成器 openApiGenerators 无输出 无错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61687998/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com