Title: 建议:在输入引用赋值顺序错误时给出更明显的提示 · Issue #275 · APIJSON/APIJSON · GitHub
Open Graph Title: 建议:在输入引用赋值顺序错误时给出更明显的提示 · Issue #275 · APIJSON/APIJSON
X Title: 建议:在输入引用赋值顺序错误时给出更明显的提示 · Issue #275 · APIJSON/APIJSON
Description: 引用赋值需要请求中先出现原始值,然后才能被引用,如果顺序相反则引用无法成功。但是在使用 Request 表对输入进行校验时,引用赋值出现的位置(Request 表中)和用户实际使用的位置(POST 请求体)并不相同,在用户请求中因为顺序错误导致引用赋值失败时,给出的错误提示不够明显,导致排错十分困难。希望能给出更明显的提示。 问题场景:APIJSONBoot 示例项目中,有 User, Privacy 两表,其中用户注册时,请求会和 Request 表中对应项 (met...
Open Graph Description: 引用赋值需要请求中先出现原始值,然后才能被引用,如果顺序相反则引用无法成功。但是在使用 Request 表对输入进行校验时,引用赋值出现的位置(Request 表中)和用户实际使用的位置(POST 请求体)并不相同,在用户请求中因为顺序错误导致引用赋值失败时,给出的错误提示不够明显,导致排错十分困难。希望能给出更明显的提示。 问题场景:APIJSONBoot 示例项目中,有 User, Pr...
X Description: 引用赋值需要请求中先出现原始值,然后才能被引用,如果顺序相反则引用无法成功。但是在使用 Request 表对输入进行校验时,引用赋值出现的位置(Request 表中)和用户实际使用的位置(POST 请求体)并不相同,在用户请求中因为顺序错误导致引用赋值失败时,给出的错误提示不够明显,导致排错十分困难。希望能给出更明显的提示。 问题场景:APIJSONBoot 示例项目中,有 User, Pr...
Opengraph URL: https://github.com/APIJSON/APIJSON/issues/275
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"建议:在输入引用赋值顺序错误时给出更明显的提示","articleBody":"引用赋值需要请求中先出现原始值,然后才能被引用,如果顺序相反则引用无法成功。但是在使用 Request 表对输入进行校验时,引用赋值出现的位置(Request 表中)和用户实际使用的位置(POST 请求体)并不相同,在用户请求中因为顺序错误导致引用赋值失败时,给出的错误提示不够明显,导致排错十分困难。希望能给出更明显的提示。\r\n\r\n问题场景:APIJSONBoot 示例项目中,有 User, Privacy 两表,其中用户注册时,请求会和 Request 表中对应项 (method=POST, tag=register)进行校验,校验规则简化如下,即 `user.id` 依赖于 `privacy.id` 。\r\n\r\n简化后的依赖关系\r\n```json\r\n{\r\n \"User\": {\r\n \"UPDATE\": {\"id@\": \"Privacy/id\"}\r\n },\r\n \"Privacy\": {}\r\n}\r\n```\r\n在实际发起请求的时候,Requestbody 中需要 `Privacy` 在上,`User` 在下,如果顺序反过来,用户注册本身不会成功(数据库中无写入操作),但是请求显示正常完成(code=200)。\r\n\r\n错误请求例(method=POST, addr=/post)\r\n```json\r\n{\r\n \"User\": {\r\n \"name\": \"test\"\r\n },\r\n \"Privacy\": {\r\n \"phone\": \"13323332338\",\r\n \"_password\": \"testpwd\"\r\n },\r\n \"verify\": \"9816\",\r\n \"tag\": \"register\"\r\n}\r\n```\r\n\r\n此情况下返回值(返回200,但 sql.execute 为0)\r\n```json\r\n{\r\n \"ok\": true,\r\n \"code\": 200,\r\n \"msg\": \"success\",\r\n \"sql:generate|cache|execute|maxExecute\": \"0|0|0|200\",\r\n \"depth:count|max\": \"1|5\",\r\n \"time:start|duration|end\": \"1627506120546|7|1627506120553\"\r\n}\r\n```","author":{"url":"https://github.com/jerrylususu","@type":"Person","name":"jerrylususu"},"datePublished":"2021-07-28T21:10:14Z","url":"https://github.com/APIJSON/APIJSON/issues/275"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2f29ac45-b144-3e7c-7cbb-07bc8ada3d67 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 838C:2AABF1:1A7351B:252CD41:6AFD07CB |
| html-safe-nonce | d7d6e41495ab26f7f6db6583ad9ae16f35a32c11f2b4a8cd44557d8364a684bc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MzhDOjJBQUJGMToxQTczNTFCOjI1MkNENDE6NkFGRDA3Q0IiLCJ2aXNpdG9yX2lkIjoiMTYwNDU1OTc0NTg5NTQzNDE4NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1ec1d34e0834b4c4068d6c26f3bc8fcfa7e28d85e3010d1ddb674d41891075bc |
| hovercard-subject-tag | issue:955236636 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/APIJSON/APIJSON/275/issue_layout |
| twitter:image | https://opengraph.githubassets.com/79ccddff624544152bbdcfdfbd7ddd5984f62cfaa01d2ac5a5113d774bd52584/APIJSON/APIJSON/issues/275 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/79ccddff624544152bbdcfdfbd7ddd5984f62cfaa01d2ac5a5113d774bd52584/APIJSON/APIJSON/issues/275 |
| og:image:alt | 引用赋值需要请求中先出现原始值,然后才能被引用,如果顺序相反则引用无法成功。但是在使用 Request 表对输入进行校验时,引用赋值出现的位置(Request 表中)和用户实际使用的位置(POST 请求体)并不相同,在用户请求中因为顺序错误导致引用赋值失败时,给出的错误提示不够明显,导致排错十分困难。希望能给出更明显的提示。 问题场景:APIJSONBoot 示例项目中,有 User, Pr... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jerrylususu |
| hostname | github.com |
| expected-hostname | github.com |
| None | 8fd5a24ae29aa78df114eaaf1f9a839e8c3b7c0d27549e4f54678bb7cf3166d4 |
| turbo-cache-control | no-preview |
| go-import | github.com/APIJSON/APIJSON git https://github.com/APIJSON/APIJSON.git |
| octolytics-dimension-user_id | 41146037 |
| octolytics-dimension-user_login | APIJSON |
| octolytics-dimension-repository_id | 74359442 |
| octolytics-dimension-repository_nwo | APIJSON/APIJSON |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 74359442 |
| octolytics-dimension-repository_network_root_nwo | APIJSON/APIJSON |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | dd0990b833f227378ab84f1d9519db1a04660550 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width