René's URL Explorer Experiment


Title: 几个建议(我可以协助完成) · Issue #89 · phalapi/phalapi · GitHub

Open Graph Title: 几个建议(我可以协助完成) · Issue #89 · phalapi/phalapi

X Title: 几个建议(我可以协助完成) · Issue #89 · phalapi/phalapi

Description: 首先第一步, 注释规范化. . 建议使用apidocjs的方案. 比如下面是我的代码: /** * @api {post} /auth/register/email 邮箱注册 * @apiDescription 注册时, 请求体将不可避免地用明文传参.所以建议开启SSL. * @apiVersion 2.0.0 * @apiPermission none * @apiName registerByEmail * @apiGroup Auth * * @apiParam ...

Open Graph Description: 首先第一步, 注释规范化. . 建议使用apidocjs的方案. 比如下面是我的代码: /** * @api {post} /auth/register/email 邮箱注册 * @apiDescription 注册时, 请求体将不可避免地用明文传参.所以建议开启SSL. * @apiVersion 2.0.0 * @apiPermission none * @apiName registe...

X Description: 首先第一步, 注释规范化. . 建议使用apidocjs的方案. 比如下面是我的代码: /** * @api {post} /auth/register/email 邮箱注册 * @apiDescription 注册时, 请求体将不可避免地用明文传参.所以建议开启SSL. * @apiVersion 2.0.0 * @apiPermission none * @apiName registe...

Opengraph URL: https://github.com/phalapi/phalapi/issues/89

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"几个建议(我可以协助完成)","articleBody":"首先第一步, 注释规范化. . 建议使用[apidocjs](http://apidocjs.com/)的方案. 比如下面是我的代码:\r\n```php\r\n    /**\r\n     * @api {post} /auth/register/email 邮箱注册\r\n     * @apiDescription 注册时, 请求体将不可避免地用明文传参.所以建议开启SSL.\r\n     * @apiVersion 2.0.0\r\n     * @apiPermission none\r\n     * @apiName registerByEmail\r\n     * @apiGroup Auth\r\n     *\r\n     * @apiParam {String{3..16}} username  用户名.\r\n     * @apiParam {String{..32}} email  用户邮箱.\r\n     * @apiParam {String{6}} captch  验证码.\r\n     * @apiParam {String} password  密码.\r\n     *\r\n     * @apiSuccessExample 成功响应:\r\n            {\r\n                \"ret\": 200,\r\n                \"data\": {},\r\n                \"msg\": \"\"\r\n            }\r\n     */\r\n    public function registerByEmail()\r\n    {\r\n        $domain = new Domain();\r\n        /** ============== 格式检查 ============== */\r\n        /** ------- 用户名检查 ------- */\r\n        $this->username = trim($this->username);\r\n        if (!\\App\\Helper\\Validator::checkUsernameFormat($this->username)) {\r\n            throw new BadRequestException('用户名格式错误, 请检查用户名格式是否正确. 只可以含有?.@_所有中英文和emoji.');\r\n        }\r\n        /** ------- 邮箱检查   ------- */\r\n        $this->email = trim($this->email);\r\n        if (!\\App\\Helper\\Validator::checkEmailFormat($this->email)) {\r\n            throw new BadRequestException('邮箱格式错误, 必须形如 username@website.domain 的格式');\r\n        }\r\n        /** ============== 正式检查 ============== */\r\n        // 检查可用性(重复)\r\n        if (!$domain->isEmailAvailable($this->email)) {\r\n            throw new BadRequestException('邮箱已被使用');\r\n        }\r\n        /** ------- captch validating ------- */\r\n        $this->captch = trim($this->captch);\r\n        $correctCaptch = $domain->getLastCaptch($this->email);\r\n        if ($correctCaptch == null) {\r\n            throw new BadRequestException('未发送验证码');\r\n        }\r\n        if ($this->captch != $correctCaptch) {\r\n            throw new BadRequestException('验证码错误或过期');\r\n        }\r\n        /** ------- password validating ------- */\r\n        // 密码不进行 trim()\r\n        /** ------- 完成注册 ------- */\r\n        $domain->registerUserByEmail($this->username, $this->email, $this->password, 1);\r\n\r\n        // 目前规定, 失败才返回消息\r\n        //\\PhalApi\\DI()->response->setMsg(\"注册成功\");\r\n\r\n        return array();\r\n    }\r\n```\r\n\r\n1. 在目前的设计中, getRules 和 API 实现距离太远, 无论是查找和修改都麻烦, 降低了开发效率. 建议直接从注释中读取规则.\r\n2. 建议能够从注释直接生成fastroute的配置. 比如上面这个就是post方式, 地址为/auth/register/email\r\n3. 建议直接从注释中判断执行权限, 比如这里 @apiPermission none, 就表示任何人都有权限.\r\n\r\napidoc 已经能够直接生成json, 读取json再生成相应所需php文件, 并不困难.","author":{"url":"https://github.com/pluveto","@type":"Person","name":"pluveto"},"datePublished":"2019-05-23T07:41:44Z","url":"https://github.com/phalapi/phalapi/issues/89"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:f117a871-6cde-8de6-3c60-5d2c21960be1
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBDBA:39E772:F858C:152D7A:6B006340
html-safe-noncef73b420bc05f50b6b8bf9f849e2f6bc1dded463401e5d95f30ef967a2c1d343d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCREJBOjM5RTc3MjpGODU4QzoxNTJEN0E6NkIwMDYzNDAiLCJ2aXNpdG9yX2lkIjoiMTk3MTUwMzg4ODg5NjkxMDE0NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacb6887f32a526f96fda94d72f658719f68c31ae41a7a1c7a4d9bd775e0346378a
hovercard-subject-tagissue:447497606
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/phalapi/phalapi/89/issue_layout
twitter:imagehttps://opengraph.githubassets.com/381c1548dbb9f1c351a48da67682895fb44ce76f79bd1dbe54bb117f6beb0f08/phalapi/phalapi/issues/89
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/381c1548dbb9f1c351a48da67682895fb44ce76f79bd1dbe54bb117f6beb0f08/phalapi/phalapi/issues/89
og:image:alt首先第一步, 注释规范化. . 建议使用apidocjs的方案. 比如下面是我的代码: /** * @api {post} /auth/register/email 邮箱注册 * @apiDescription 注册时, 请求体将不可避免地用明文传参.所以建议开启SSL. * @apiVersion 2.0.0 * @apiPermission none * @apiName registe...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamepluveto
hostnamegithub.com
expected-hostnamegithub.com
None25854482a1773a7c1ebb8be3d2bc1c6e61d82d78126be63b5044474a86d44d9e
turbo-cache-controlno-preview
go-importgithub.com/phalapi/phalapi git https://github.com/phalapi/phalapi.git
octolytics-dimension-user_id12585518
octolytics-dimension-user_loginphalapi
octolytics-dimension-repository_id36178323
octolytics-dimension-repository_nwophalapi/phalapi
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id36178323
octolytics-dimension-repository_network_root_nwophalapi/phalapi
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasee4f5c239e31f1f680e6bbc419ff92d774da616ec
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/phalapi/phalapi/issues/89#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fphalapi%2Fphalapi%2Fissues%2F89
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fphalapi%2Fphalapi%2Fissues%2F89
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=phalapi%2Fphalapi
Reloadhttps://github.com/phalapi/phalapi/issues/89
Reloadhttps://github.com/phalapi/phalapi/issues/89
Reloadhttps://github.com/phalapi/phalapi/issues/89
phalapihttps://github.com/phalapi
phalapihttps://github.com/phalapi/phalapi
Codehttps://github.com/phalapi/phalapi
Issues28 (28)https://github.com/phalapi/phalapi/issues
Pull requests2 (2)https://github.com/phalapi/phalapi/pulls
Actionshttps://github.com/phalapi/phalapi/actions
Projectshttps://github.com/phalapi/phalapi/projects
Wikihttps://github.com/phalapi/phalapi/wiki
Security and qualityhttps://github.com/phalapi/phalapi/security
Insightshttps://github.com/phalapi/phalapi/pulse
https://github.com/phalapi/phalapi
New issuehttps://github.com/login?return_to=https://github.com/phalapi/phalapi/issues/89
New issuehttps://github.com/login?return_to=https://github.com/phalapi/phalapi/issues/89
几个建议(我可以协助完成)https://github.com/phalapi/phalapi/issues/89#top
https://github.com/pluveto
pluvetohttps://github.com/pluveto
on May 23, 2019https://github.com/phalapi/phalapi/issues/89#issue-447497606
apidocjshttp://apidocjs.com/
https://github.com/phalapi
phalapihttps://github.com/phalapi
on May 23, 2019https://github.com/phalapi/phalapi/issues/89#issuecomment-495216681
https://github.com/pluveto
pluvetohttps://github.com/pluveto
on May 23, 2019https://github.com/phalapi/phalapi/issues/89#issuecomment-495226000
https://github.com/pluveto
pluvetohttps://github.com/pluveto
on May 23, 2019https://github.com/phalapi/phalapi/issues/89#issuecomment-495226765
https://github.com/phalapi
phalapihttps://github.com/phalapi
on May 23, 2019https://github.com/phalapi/phalapi/issues/89#issuecomment-495238714
https://github.com/pluveto
pluvetohttps://github.com/pluveto
on May 23, 2019https://github.com/phalapi/phalapi/issues/89#issuecomment-495241757
https://github.com/phalapi
phalapihttps://github.com/phalapi
on May 23, 2019https://github.com/phalapi/phalapi/issues/89#issuecomment-495243070
https://github.com/pluveto
pluvetohttps://github.com/pluveto
on May 23, 2019https://github.com/phalapi/phalapi/issues/89#issuecomment-495244285
https://github.com/phalapi
phalapihttps://github.com/phalapi
on May 23, 2019https://github.com/phalapi/phalapi/issues/89#issuecomment-495246700
https://github.com/pluveto
pluvetohttps://github.com/pluveto
on May 23, 2019https://github.com/phalapi/phalapi/issues/89#issuecomment-495249700
Sign up for freehttps://github.com/signup?return_to=https://github.com/phalapi/phalapi/issues/89
Sign in to commenthttps://github.com/login?return_to=https://github.com/phalapi/phalapi/issues/89
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.