@aep_dev/aep-openapi-linter

中文文档
0.5.3发布于 2026/02/26MITCommonJS构建来源已验证近 30 天下载 1747

Linter for OpenAPI definitions to check compliance to AEPs

原始使用文档
文档目录6 节
  1. How to use the aep-openapi-linter
  2. Dependencies
  3. Installation
  4. Usage
  5. Using the Spectral VSCode extension
  6. Contributing

aep-openapi-linter

Linter for OpenAPI definitions to check compliance to AEPs.

This repository contains a Spectral ruleset to check an OpenAPI document for conformance to the API Enhancement Proposals.

How to use the aep-openapi-linter

Dependencies

The Spectral Ruleset requires:

Installation

You can use the aep-openapi-linter as an npm package or directly from GitHub.

If you choose to use it as an npm package, install it in your project as you would any other npm package:

npm install @aep_dev/aep-openapi-linter

Usage

To use the aep-openapi-linter, create a Spectral configuration file (.spectral.yaml) that references the ruleset. If you installed the aep-openapi-linter npm package into your project, you can just reference the ruleset by name:

extends:
  - '@aep_dev/aep-openapi-linter'

Note that the quotes are required by yaml syntax.

You can also bypass installing the npm aep-openapi-linter package and reference the ruleset directly from GitHub:

extends:
  - https://raw.githubusercontent.com/aep-dev/aep-openapi-linter/main/spectral.yaml

You can pin to a specific release of the ruleset by replacing main with the tag for the release. E.g.

extends:
  - https://raw.githubusercontent.com/aep-dev/aep-openapi-linter/refs/tags/v0.5.1/spectral.yaml

Using the Spectral VSCode extension

There is a Spectral VSCode extension that will run the Spectral linter on an open API definition file and show errors right within VSCode. You can use this ruleset with the Spectral VSCode extension.

  1. Install the Spectral VSCode extension from the extensions tab in VSCode.
  2. Create a Spectral configuration file (.spectral.yaml) in the root directory of your project as shown above.
  3. Set spectral.rulesetFile to the name of this configuration file in your VSCode settings.

Now when you open an OpenAPI document in this project, it should highlight lines with errors. You can also get a full list of problems in the file by opening the "Problems panel" with "View / Problems". In the Problems panel you can filter to show or hide errors, warnings, or infos.

Contributing

See CONTRIBUTING for more details.

版本与发布记录

@aep_dev/aep-openapi-linter 共发布 2 个版本,首次发布于 2026/01/30;过去 12 个月发布了 2 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.5.3latest2026/02/268 个月前
0.5.12026/01/309 个月前

关于 @aep_dev/aep-openapi-linter 的常见问题

@aep_dev/aep-openapi-linter 是什么?

Linter for OpenAPI definitions to check compliance to AEPs

如何安装 @aep_dev/aep-openapi-linter?

在项目目录运行 npm install @aep_dev/aep-openapi-linter,或使用 pnpm add / yarn add / bun add。

@aep_dev/aep-openapi-linter 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/aep_dev__aep-openapi-linter 是否存在。

@aep_dev/aep-openapi-linter 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@aep_dev/aep-openapi-linter 可以商用吗?

@aep_dev/aep-openapi-linter 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@aep_dev/aep-openapi-linter 的下载量有多少?

根据 npm 官方下载统计,@aep_dev/aep-openapi-linter 在 2026/10/05 – 2026/11/03 这 30 天内被下载 1,747 次,日均约 58 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@aep_dev/aep-openapi-linter 还在维护吗?

最新版本 0.5.3 发布于 2026/02/26(8 个月前);至今共发布 2 个版本,其中过去 12 个月发布了 2 个;首次发布于 2026/01/30。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。