|
|
@@ -15,7 +15,7 @@
|
|
|
*
|
|
|
* International Academy Of Pali Tipitaka(国际巴利三藏学院) 由 `php openapi/scripts/generate.php` 依据 api-v13 的路由与控制器源码生成。 响应统一封装为 `{ok, message, data}`;`ok=false` 时 `message` 为错误信息。
|
|
|
*
|
|
|
- * The version of the OpenAPI document: 2026.10.21
|
|
|
+ * The version of the OpenAPI document: 2026.10.22
|
|
|
* Generated by: https://openapi-generator.tech
|
|
|
* Generator version: 7.25.0
|
|
|
*/
|
|
|
@@ -63,6 +63,7 @@ class PostApiV3DiscussionsRequest implements ModelInterface, ArrayAccess, \JsonS
|
|
|
'title' => 'string',
|
|
|
'content' => 'string',
|
|
|
'severity' => 'string',
|
|
|
+ 'score' => 'float',
|
|
|
'pos_start' => 'int',
|
|
|
'pos_end' => 'int',
|
|
|
'quote_exact' => 'string',
|
|
|
@@ -86,6 +87,7 @@ class PostApiV3DiscussionsRequest implements ModelInterface, ArrayAccess, \JsonS
|
|
|
'title' => null,
|
|
|
'content' => null,
|
|
|
'severity' => null,
|
|
|
+ 'score' => null,
|
|
|
'pos_start' => null,
|
|
|
'pos_end' => null,
|
|
|
'quote_exact' => null,
|
|
|
@@ -107,6 +109,7 @@ class PostApiV3DiscussionsRequest implements ModelInterface, ArrayAccess, \JsonS
|
|
|
'title' => false,
|
|
|
'content' => false,
|
|
|
'severity' => false,
|
|
|
+ 'score' => false,
|
|
|
'pos_start' => false,
|
|
|
'pos_end' => false,
|
|
|
'quote_exact' => false,
|
|
|
@@ -208,6 +211,7 @@ class PostApiV3DiscussionsRequest implements ModelInterface, ArrayAccess, \JsonS
|
|
|
'title' => 'title',
|
|
|
'content' => 'content',
|
|
|
'severity' => 'severity',
|
|
|
+ 'score' => 'score',
|
|
|
'pos_start' => 'pos_start',
|
|
|
'pos_end' => 'pos_end',
|
|
|
'quote_exact' => 'quote_exact',
|
|
|
@@ -229,6 +233,7 @@ class PostApiV3DiscussionsRequest implements ModelInterface, ArrayAccess, \JsonS
|
|
|
'title' => 'setTitle',
|
|
|
'content' => 'setContent',
|
|
|
'severity' => 'setSeverity',
|
|
|
+ 'score' => 'setScore',
|
|
|
'pos_start' => 'setPosStart',
|
|
|
'pos_end' => 'setPosEnd',
|
|
|
'quote_exact' => 'setQuoteExact',
|
|
|
@@ -250,6 +255,7 @@ class PostApiV3DiscussionsRequest implements ModelInterface, ArrayAccess, \JsonS
|
|
|
'title' => 'getTitle',
|
|
|
'content' => 'getContent',
|
|
|
'severity' => 'getSeverity',
|
|
|
+ 'score' => 'getScore',
|
|
|
'pos_start' => 'getPosStart',
|
|
|
'pos_end' => 'getPosEnd',
|
|
|
'quote_exact' => 'getQuoteExact',
|
|
|
@@ -312,11 +318,7 @@ class PostApiV3DiscussionsRequest implements ModelInterface, ArrayAccess, \JsonS
|
|
|
public const TYPE_GLOSSARY = 'glossary';
|
|
|
public const TYPE_NOTE = 'note';
|
|
|
public const TYPE_COMMENTARY = 'commentary';
|
|
|
- public const SEVERITY_ERROR = 'error';
|
|
|
- public const SEVERITY_WARNING = 'warning';
|
|
|
- public const SEVERITY_SUGGESTION = 'suggestion';
|
|
|
- public const SEVERITY_URGENT = 'urgent';
|
|
|
- public const SEVERITY_NORMAL = 'normal';
|
|
|
+ public const TYPE_ASSESSMENT = 'assessment';
|
|
|
|
|
|
/**
|
|
|
* Gets allowable values of the enum
|
|
|
@@ -349,22 +351,7 @@ class PostApiV3DiscussionsRequest implements ModelInterface, ArrayAccess, \JsonS
|
|
|
self::TYPE_GLOSSARY,
|
|
|
self::TYPE_NOTE,
|
|
|
self::TYPE_COMMENTARY,
|
|
|
- ];
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * Gets allowable values of the enum
|
|
|
- *
|
|
|
- * @return string[]
|
|
|
- */
|
|
|
- public function getSeverityAllowableValues()
|
|
|
- {
|
|
|
- return [
|
|
|
- self::SEVERITY_ERROR,
|
|
|
- self::SEVERITY_WARNING,
|
|
|
- self::SEVERITY_SUGGESTION,
|
|
|
- self::SEVERITY_URGENT,
|
|
|
- self::SEVERITY_NORMAL,
|
|
|
+ self::TYPE_ASSESSMENT,
|
|
|
];
|
|
|
}
|
|
|
|
|
|
@@ -389,6 +376,7 @@ class PostApiV3DiscussionsRequest implements ModelInterface, ArrayAccess, \JsonS
|
|
|
$this->setIfExists('title', $data ?? [], null);
|
|
|
$this->setIfExists('content', $data ?? [], null);
|
|
|
$this->setIfExists('severity', $data ?? [], null);
|
|
|
+ $this->setIfExists('score', $data ?? [], null);
|
|
|
$this->setIfExists('pos_start', $data ?? [], null);
|
|
|
$this->setIfExists('pos_end', $data ?? [], null);
|
|
|
$this->setIfExists('quote_exact', $data ?? [], null);
|
|
|
@@ -449,15 +437,6 @@ class PostApiV3DiscussionsRequest implements ModelInterface, ArrayAccess, \JsonS
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- $allowedValues = $this->getSeverityAllowableValues();
|
|
|
- if (!is_null($this->container['severity']) && !in_array($this->container['severity'], $allowedValues, true)) {
|
|
|
- $invalidProperties[] = sprintf(
|
|
|
- "invalid value '%s' for 'severity', must be one of '%s'",
|
|
|
- $this->container['severity'],
|
|
|
- implode("', '", $allowedValues)
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
return $invalidProperties;
|
|
|
}
|
|
|
|
|
|
@@ -587,7 +566,7 @@ class PostApiV3DiscussionsRequest implements ModelInterface, ArrayAccess, \JsonS
|
|
|
/**
|
|
|
* Sets title
|
|
|
*
|
|
|
- * @param string|null $title 标题,最长 256 字符;评论线程必填(glossary 填术语词头),批注可省
|
|
|
+ * @param string|null $title 标题,最长 256 字符;评论线程必填(glossary 填术语词头),批注与评估可省
|
|
|
*
|
|
|
* @return self
|
|
|
*/
|
|
|
@@ -614,7 +593,7 @@ class PostApiV3DiscussionsRequest implements ModelInterface, ArrayAccess, \JsonS
|
|
|
/**
|
|
|
* Sets content
|
|
|
*
|
|
|
- * @param string|null $content 正文(markdown);批注必填
|
|
|
+ * @param string|null $content 正文(markdown);批注必填,评估写打分理由
|
|
|
*
|
|
|
* @return self
|
|
|
*/
|
|
|
@@ -641,7 +620,7 @@ class PostApiV3DiscussionsRequest implements ModelInterface, ArrayAccess, \JsonS
|
|
|
/**
|
|
|
* Sets severity
|
|
|
*
|
|
|
- * @param string|null $severity 严重程度
|
|
|
+ * @param string|null $severity 严重程度:issue 为 error / warning / suggestion,help 为 urgent / normal;assessment 必填,填评估方法(1–16 位字母数字 . _ -)
|
|
|
*
|
|
|
* @return self
|
|
|
*/
|
|
|
@@ -650,21 +629,38 @@ class PostApiV3DiscussionsRequest implements ModelInterface, ArrayAccess, \JsonS
|
|
|
if (is_null($severity)) {
|
|
|
throw new \InvalidArgumentException('non-nullable severity cannot be null');
|
|
|
}
|
|
|
- $allowedValues = $this->getSeverityAllowableValues();
|
|
|
- if (!in_array($severity, $allowedValues, true)) {
|
|
|
- throw new \InvalidArgumentException(
|
|
|
- sprintf(
|
|
|
- "Invalid value '%s' for 'severity', must be one of '%s'",
|
|
|
- $severity,
|
|
|
- implode("', '", $allowedValues)
|
|
|
- )
|
|
|
- );
|
|
|
- }
|
|
|
$this->container['severity'] = $severity;
|
|
|
|
|
|
return $this;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Gets score
|
|
|
+ *
|
|
|
+ * @return float|null
|
|
|
+ */
|
|
|
+ public function getScore()
|
|
|
+ {
|
|
|
+ return $this->container['score'];
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Sets score
|
|
|
+ *
|
|
|
+ * @param float|null $score 评估分数 0–100(只限且必填于 assessment)
|
|
|
+ *
|
|
|
+ * @return self
|
|
|
+ */
|
|
|
+ public function setScore($score)
|
|
|
+ {
|
|
|
+ if (is_null($score)) {
|
|
|
+ throw new \InvalidArgumentException('non-nullable score cannot be null');
|
|
|
+ }
|
|
|
+ $this->container['score'] = $score;
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Gets pos_start
|
|
|
*
|