jolielang/docs本仓库用于管理Jolie官方文档,文档在线地址为:<[***]>。
注意:若需更新文档,请勿直接修改主分支。需根据Jolie版本更新对应分支,例如:Jolie 1.10.x 版本的文档需更新 v1.10.x 分支。
v1.10.x 分支对应 1.10.x 版本)。本仓库主要面向Jolie文档贡献者,适用于以下场景:
4.1.1.1 命名约定
| 元素类型 | 命名规则 | 示例 |
|---|---|---|
| outputPort及其子项 | 小驼峰式命名 | myOutputPort、httpLocation |
| inputPort及其子项 | 小驼峰式命名 | mainInputPort、jsonProtocol |
| 服务名(ServiceName) | 大驼峰式命名 | FileTransferService |
| 类型名(TypeName) | 大驼峰式命名 | UserRequestType |
| 接口(Interfaces) | 大驼峰式命名 | FileOperationsInterface |
| 接口中的操作类型 | 大驼峰式命名 | RequestResponse、OneWay |
| 操作名(operations) | 小驼峰式命名 | readFile、sendMessage |
| 变量(variables) | 小驼峰式命名 | fileContent、responseData |
| 包名(package-name) | 烤肉串式命名 | file-utils、network-tools |
| 模块名(module-name) | 烤肉串式命名 | data-processing |
| 常量(CONSTANTS) | 全大写蛇形命名 | MAX_RETRY_COUNT、DEFAULT_PORT |
| define语句 | 小驼峰式命名 | maxBufferSize |
| private成员 | 小驼峰式命名 | privateConfig |
4.1.1.2 请求消息分配规范
优先使用内联语法:尽量简化请求消息赋值,直接内联定义参数。
推荐:
joliereadFile@file( { filename = "test.txt" } )( response )
不推荐:
jolierequest.filename = "test.txt" readFile@File( request )( response )
多行格式化:参数较多时,使用多行排版提高可读性。
joliewriteFile@File( { filename = "text.txt" content = "this is a test message" } )()
复杂消息处理:当请求消息包含多级节点时,使用深拷贝(<<)或with语句。
深拷贝示例:
jolierequest << { node1 = "node1" node2 = "node2" node3 = "node3" ... }
with语句示例:
joliewith( request ) { node1 = "node1"; node2 = "node2"; node3 = "node3"; ... }
创建分支时需遵循格式:tutorials/fix/name-of-the-tutorial(其中name-of-the-tutorial为教程名称)。
创建分支时需遵循格式:tutorials/new/short-tutorial-name(其中short-tutorial-name为教程简称)。
步骤1:在 jolie/examples 仓库中操作
bashgit checkout -b tutorials/new/short-tutorial-name
bashcd examples/v1.10.x/tutorials/
bashmkdir short-tutorial-name
步骤2:在 jolie/docs 仓库中操作
v1.10.x):
bashgit checkout v1.10.x
bashgit checkout -b tutorials/new/short-tutorial-name
bashcd docs/web/tutorials/
bashmkdir short-tutorial-name && cd short-tutorial-name
README.md,内容需包含:
jolie/examples 仓库中对应示例代码的路径。docs/src/images/,复制一个现有 .svg 文件作为模板,重命名为新文件名。Segoe Print。.svg 文件至 docs/src/images/(源文件)。.png 文件至 docs/web/assets/。.png 文件,示例链接格式:
markdown。完成文档编辑后,提交Pull Request至对应版本分支。


manifest unknown 错误
TLS 证书验证失败
DNS 解析超时
410 错误:版本过低
402 错误:流量耗尽
身份认证失败错误
429 限流错误
凭证保存错误
来自真实用户的反馈,见证轩辕镜像的优质服务