Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
梦境迷离
Graphql Java Codegen
提交
e3996e80
G
Graphql Java Codegen
项目概览
梦境迷离
/
Graphql Java Codegen
10 个月 前同步成功
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Graphql Java Codegen
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
e3996e80
编写于
2月 11, 2021
作者:
B
Bogdan Kobylynskyi
提交者:
GitHub
2月 11, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix code generation from introspection result #535 (#536)
上级
5846fe20
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
33 addition
and
20 deletion
+33
-20
plugins/gradle/graphql-java-codegen-gradle-plugin/src/main/java/io/github/kobylynskyi/graphql/codegen/gradle/GraphQLCodegenGradleTask.java
...skyi/graphql/codegen/gradle/GraphQLCodegenGradleTask.java
+4
-0
plugins/maven/graphql-java-codegen-maven-plugin/src/main/java/io/github/kobylynskyi/graphql/codegen/GraphQLCodegenMojo.java
...ithub/kobylynskyi/graphql/codegen/GraphQLCodegenMojo.java
+3
-0
plugins/sbt/graphql-java-codegen-sbt-plugin/src/main/scala/io/github/dreamylost/graphql/codegen/GraphQLCodegenPlugin.scala
...hub/dreamylost/graphql/codegen/GraphQLCodegenPlugin.scala
+7
-1
src/main/java/com/kobylynskyi/graphql/codegen/GraphQLCodegen.java
.../java/com/kobylynskyi/graphql/codegen/GraphQLCodegen.java
+19
-19
未找到文件。
plugins/gradle/graphql-java-codegen-gradle-plugin/src/main/java/io/github/kobylynskyi/graphql/codegen/gradle/GraphQLCodegenGradleTask.java
浏览文件 @
e3996e80
...
...
@@ -32,6 +32,7 @@ import java.io.File;
import
java.io.IOException
;
import
java.nio.file.Path
;
import
java.nio.file.Paths
;
import
java.util.Collections
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.List
;
...
...
@@ -180,6 +181,9 @@ public class GraphQLCodegenGradleTask extends DefaultTask implements GraphQLCode
if
(
graphqlSchemaPaths
!=
null
)
{
return
graphqlSchemaPaths
;
}
if
(
graphqlQueryIntrospectionResultPath
!=
null
)
{
return
Collections
.
emptyList
();
}
Path
rootDir
=
getSchemasRootDir
();
SchemaFinder
finder
=
new
SchemaFinder
(
rootDir
);
finder
.
setRecursive
(
graphqlSchemas
.
isRecursive
());
...
...
plugins/maven/graphql-java-codegen-maven-plugin/src/main/java/io/github/kobylynskyi/graphql/codegen/GraphQLCodegenMojo.java
浏览文件 @
e3996e80
...
...
@@ -273,6 +273,9 @@ public class GraphQLCodegenMojo extends AbstractMojo implements GraphQLCodegenCo
if
(
graphqlSchemaPaths
!=
null
)
{
return
Arrays
.
asList
(
graphqlSchemaPaths
);
}
if
(
graphqlQueryIntrospectionResultPath
!=
null
)
{
return
Collections
.
emptyList
();
}
Path
schemasRootDir
=
getSchemasRootDir
();
SchemaFinder
finder
=
new
SchemaFinder
(
schemasRootDir
);
finder
.
setRecursive
(
graphqlSchemas
.
isRecursive
());
...
...
plugins/sbt/graphql-java-codegen-sbt-plugin/src/main/scala/io/github/dreamylost/graphql/codegen/GraphQLCodegenPlugin.scala
浏览文件 @
e3996e80
...
...
@@ -228,8 +228,14 @@ class GraphQLCodegenPlugin(configuration: Configuration, private[codegen] val co
}
def
getSchemas
:
util.List
[
String
]
=
{
if
((
graphqlSchemaPaths
in
GraphQLCodegenConfig
).
value
!=
null
&&
(
graphqlSchemaPaths
in
GraphQLCodegenConfig
).
value
.
nonEmpty
)
if
((
graphqlSchemaPaths
in
GraphQLCodegenConfig
).
value
!=
null
&&
(
graphqlSchemaPaths
in
GraphQLCodegenConfig
).
value
.
nonEmpty
)
{
return
(
graphqlSchemaPaths
in
GraphQLCodegenConfig
).
value
.
asJava
}
if
((
graphqlQueryIntrospectionResultPath
in
GraphQLCodegenConfig
).
value
!=
null
&&
!(
graphqlQueryIntrospectionResultPath
in
GraphQLCodegenConfig
).
value
.
isEmpty
)
{
return
List
[
String
]().
asJava
}
val
schemasRootDir
:
Path
=
getSchemasRootDir
val
finder
:
SchemaFinder
=
new
SchemaFinder
(
schemasRootDir
)
finder
.
setRecursive
((
graphqlSchemas
in
GraphQLCodegenConfig
).
value
.
recursive
)
...
...
src/main/java/com/kobylynskyi/graphql/codegen/GraphQLCodegen.java
浏览文件 @
e3996e80
...
...
@@ -53,40 +53,40 @@ public abstract class GraphQLCodegen {
// used in tests
protected
GraphQLCodegen
(
List
<
String
>
schemas
,
File
outputDir
,
MappingConfig
mappingConfig
,
GeneratedInformation
generatedInformation
,
MapperFactory
mapperFactory
)
{
File
outputDir
,
MappingConfig
mappingConfig
,
GeneratedInformation
generatedInformation
,
MapperFactory
mapperFactory
)
{
this
(
schemas
,
null
,
outputDir
,
mappingConfig
,
null
,
generatedInformation
,
mapperFactory
);
}
// used in tests
protected
GraphQLCodegen
(
String
introspectionResult
,
File
outputDir
,
MappingConfig
mappingConfig
,
GeneratedInformation
generatedInformation
,
MapperFactory
mapperFactory
)
{
File
outputDir
,
MappingConfig
mappingConfig
,
GeneratedInformation
generatedInformation
,
MapperFactory
mapperFactory
)
{
this
(
null
,
introspectionResult
,
outputDir
,
mappingConfig
,
null
,
generatedInformation
,
mapperFactory
);
}
// used in plugins
protected
GraphQLCodegen
(
List
<
String
>
schemas
,
String
introspectionResult
,
File
outputDir
,
MappingConfig
mappingConfig
,
MappingConfigSupplier
externalMappingConfigSupplier
,
MapperFactory
mapperFactory
)
{
String
introspectionResult
,
File
outputDir
,
MappingConfig
mappingConfig
,
MappingConfigSupplier
externalMappingConfigSupplier
,
MapperFactory
mapperFactory
)
{
this
(
schemas
,
introspectionResult
,
outputDir
,
mappingConfig
,
externalMappingConfigSupplier
,
new
GeneratedInformation
(),
mapperFactory
);
}
// used by other constructors
protected
GraphQLCodegen
(
List
<
String
>
schemas
,
String
introspectionResult
,
File
outputDir
,
MappingConfig
mappingConfig
,
MappingConfigSupplier
externalMappingConfigSupplier
,
GeneratedInformation
generatedInformation
,
MapperFactory
mapperFactory
)
{
String
introspectionResult
,
File
outputDir
,
MappingConfig
mappingConfig
,
MappingConfigSupplier
externalMappingConfigSupplier
,
GeneratedInformation
generatedInformation
,
MapperFactory
mapperFactory
)
{
this
.
schemas
=
schemas
;
this
.
introspectionResult
=
introspectionResult
;
this
.
outputDir
=
outputDir
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录