chore: replace all cn comments of fe to en version by volc api (#320)
This commit is contained in:
@@ -42,11 +42,11 @@ export interface IMeta {
|
||||
type Fields = string[];
|
||||
|
||||
export interface IHttpRpcMapping {
|
||||
path?: Fields; // path参数
|
||||
query?: Fields; // query参数
|
||||
body?: Fields; // body 参数
|
||||
header?: Fields; // header 参数
|
||||
status_code?: Fields; // http状态码
|
||||
path?: Fields; // path parameter
|
||||
query?: Fields; // query parameters
|
||||
body?: Fields; // Body parameters
|
||||
header?: Fields; // header parameter
|
||||
status_code?: Fields; // HTTP status code
|
||||
cookie?: Fields; // cookie
|
||||
entire_body?: Fields;
|
||||
raw_body?: Fields;
|
||||
|
||||
@@ -68,7 +68,7 @@ export function formatCode(code: string, root = '.') {
|
||||
printWidth: 120,
|
||||
singleQuote: true,
|
||||
};
|
||||
const file = path.resolve(process.cwd(), root, './for-prettier-bug'); // 这里一定要加多一级目录
|
||||
const file = path.resolve(process.cwd(), root, './for-prettier-bug'); // Be sure to add an extra level catalog here.
|
||||
const config = prettier.resolveConfig(file, { editorconfig: true });
|
||||
return prettier.format(code, {
|
||||
...(config || defaultConfig),
|
||||
@@ -166,7 +166,7 @@ export function parseId(id: string) {
|
||||
|
||||
export function uniformNs(ns: string) {
|
||||
if (ReservedKeyWord.includes(ns)) {
|
||||
// 命中保留字,处理为下划线开头
|
||||
// Hit the reserved word, treated as an underscore
|
||||
return `_${ns}`;
|
||||
}
|
||||
return ns.replace(/\./g, '_');
|
||||
@@ -182,7 +182,7 @@ export function getValuesFromEnum(params: h.EnumDefinition) {
|
||||
if (h.isIntegerLiteral(initializer.value)) {
|
||||
currentVal = Number(initializer.value.value);
|
||||
} else if (h.isHexLiteral(initializer.value)) {
|
||||
// 16进制
|
||||
// hexadecimal
|
||||
currentVal = Number(initializer.value.value);
|
||||
}
|
||||
enumArr.push(currentVal);
|
||||
@@ -322,8 +322,8 @@ export function hasDynamicJsonAnnotation(annotations?: h.Annotations) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 从 api.(request|response).converter 中解析出前端与网关之间的真实类型,
|
||||
* 能搞出这两个注解来,这个协议着实恶心😭
|
||||
* Parse the real type between the front end and the gateway from api. (request | response).converter.
|
||||
* To be able to come up with these two annotations, this protocol is disgusting😭
|
||||
* @param annotations
|
||||
* @returns
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user