知识卡片

普通读书笔记卡 · 10296.b.1.b.4.a · 生成模型:未记录

语义Lint补充确定性规则

理解等级:中级

对语义问题可让模型按自然语言规则提出线索,例如描述是否只重复字段名、集合响应是否看起来缺分页。把输入、规则与输出格式说清,要求逐项给出处,用有标签样例核对误报和漏报。字段类型、必填及其他容易形式化的条件继续用确定性规则检查。金额字段类型是本章的场景约定,采用时需对照产品契约。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • API Lint 与设计一致性 3.11 Using LLMs for automated linting · 查看原书依据

      There are many cases like these where it may not be possible or practical to write a Spectral rule. Usually, teams reserve detecting things like this for the API review (API design reviews are discussed in chapter 5). However, there is an automated method—using an LLM. LLMs can run linting on code with the rules you provide and give you violation reports in the format you specify.

    参考来源

    - 位置:《Automating API Delivery APIOps with OpenAPI》《第 03 章 API Lint 与设计一致性》(3.11 Using LLMs for automated linting;来源项目 book-source,extracted/Automating API Delivery APIOps with OpenAPI/_epub-src/OEBPS/Text/chapter-3.xhtml#p173) - 结论依据:原文指出部分规则难以用简单表达式枚举,模型可按自然语言规则输出问题报告。 - 原始内容:There are many cases like these where it may not be possible or practical to write a Spectral rule. Usually, teams reserve detecting things like this for the API review (API design reviews are discussed in chapter 5). However, there is an automated method—using an LLM. LLMs can run linting on code with the rules you provide and give you violation reports in the format you specify.