微信小程序三方平台代上传代码提交额外信息对象 新增 requiredPrivateInfos#3627
Merged
binarywang merged 1 commit intobinarywang:developfrom Jun 28, 2025
Merged
微信小程序三方平台代上传代码提交额外信息对象 新增 requiredPrivateInfos#3627binarywang merged 1 commit intobinarywang:developfrom
binarywang merged 1 commit intobinarywang:developfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new requiredPrivateInfos field to support location-related permissions in the ext_json payload and enforces consistent brace usage in several utility methods.
- Added
requiredPrivateInfosarray with accompanying JavaDoc. - Updated
addExt,addExtPage, andaddPagemethods to always use braces for single-lineifstatements.
Comments suppressed due to low confidence (1)
weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/ma/WxMaOpenCommitExtInfo.java:97
- [nitpick] The Javadoc block from lines 97–113 is very verbose and duplicates external documentation. Consider shortening it to a brief summary and providing a link to the official doc for maintainability.
/**
weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/ma/WxMaOpenCommitExtInfo.java
Show resolved
Hide resolved
weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/ma/WxMaOpenCommitExtInfo.java
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
关于新增 requiredPrivateInfos 说明 关于地理位置接口新增与相关流程调整可以查看社区公告: 点击查看 7.14后,在代码中使用的地理位置相关接口(共计 8 个,见表1),第三方开发者均需要在 ext_json 参数中 requiredPrivateInfos 配置项中声明 在ext_json参数中配置requiredPrivateInfos,其规则为「整体替换」。即如果在 app.json 里也配置了,那么最终会是ext_json的配置会覆盖 app.json 配置的requiredPrivateInfos。其余规则可查看下方的「ext_json补充说明」 在ext_json参数中配置 requiredPrivateInfos 示例如下 { "template_id": "95", "ext_json": "{"requiredPrivateInfos":["onLocationChange","startLocationUpdate"]}", "user_version": "V1.0", "user_desc": "test" } requiredPrivateInfos主要会检查格式是否正确,填入的 api 名称是否正确,填入的 api 名称是否有权限,填入的 api 名称是否互斥。对应的错误码可查看文档末尾的错误码文档。 requiredPrivateInfos在2022.7.14后才会生效,文档提前更新是为了方便开发者可以提前了解接口的参数变更规则,提前进行调整。