Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed: 修复easy-yapi的bug #1061

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -637,8 +637,8 @@ abstract class RequestClassExporter : ClassExporter {
request,
path,
tinyQueryParam(
parent?.getAs<Boolean>(Attrs.DEFAULT_VALUE_ATTR, key)
?: value
parent?.getAs<String>(Attrs.DEFAULT_VALUE_ATTR, key)
?: value.takeIfNotOriginal()
),
parent?.getAs<Boolean>(Attrs.REQUIRED_ATTR, key) ?: false,
KVUtils.getUltimateComment(parent?.getAs(Attrs.COMMENT_ATTR), key)
Expand Down Expand Up @@ -718,7 +718,7 @@ abstract class RequestClassExporter : ClassExporter {
parameterExportContext,
request, path,
tinyQueryParam(
(parent?.getAs<Boolean>(Attrs.DEFAULT_VALUE_ATTR, key)
(parent?.getAs<String>(Attrs.DEFAULT_VALUE_ATTR, key)
?: value.takeIfNotOriginal())
)?.toString(),
parent?.getAs<Boolean>(Attrs.REQUIRED_ATTR, key) ?: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ open class SuvApiExporter {

builder.bind(RuleParser::class) { it.with(SuvRuleParser::class).singleton() }
builder.bind(RuleComputeListener::class) { it.with(RuleComputeListenerRegistry::class).singleton() }
builder.bind(PsiClassHelper::class) { it.with(CustomizedPsiClassHelper::class).singleton() }
builder.bind(PsiClassHelper::class) { it.with(YapiPsiClassHelper::class).singleton() }

builder.bind(ResourceResolver::class) { it.with(CachedResourceResolver::class).singleton() }
builder.bind(FileApiCacheRepository::class) { it.with(DefaultFileApiCacheRepository::class).singleton() }
Expand Down
8 changes: 0 additions & 8 deletions idea-plugin/src/main/resources/.recommend.easy.api.config
Original file line number Diff line number Diff line change
Expand Up @@ -370,14 +370,6 @@ class.prefix.path=${server.servlet.context-path}
#ignore serialVersionUID
constant.field.ignore=groovy:it.name()=="serialVersionUID"

#[support_mock_for_general]*

#mock for date

###set resolveMulti = first
java_date_types=["java.util.Date","java.sql.Timestamp","java.time.LocalDate","java.time.LocalDateTime"]
field.mock[groovy:${java_date_types}.contains(it.type().name())&&it.jsonType().name()=="java.lang.String"] = groovy:"@datetime"
field.mock[groovy:${java_date_types}.contains(it.type().name())&&it.jsonType().name()=="java.lang.Long"] = groovy:"@timestamp@string(\"number\", 3)"
###set resolveMulti = error

#[private_protected_field_only]
Expand Down
Loading
Loading