02strich-spectral-aws-apigateway-ruleset

中文文档
1.7.4-1发布于 2023/03/08Apache-2.0CommonJS

A spectral ruleset to enforce the AWS API Gateway Important Notes

原始使用文档
文档目录5 节
  1. Spectral
  2. Instructions
  3. NPM package
  4. Contributing
  5. Treeware

Spectral AWS API Gateway Ruleset

When working with AWS API Gateway, it uses a number of features that are a step away from the OpenAPI standard.

Usefully, the features are documented here AWS API Gateway Important Notes, but it's very easy for API developers to forget, or miss them.

Spectral

Spectral is an Open Source API Linter.

Spectral is an open source JSON/YAML linter, which allows you to create style guides for your structured data; things like OpenAPI/AsyncAPI/RAML descriptions, Kubernetes config, GitHub Actions, you name it, Spectral can help you lint it. Go beyond making sure they are “Technically Correct”, make sure they are useful.

Try it out:

If you've got npx installed, then you can run this ruleset with a single command, replacing $your_api.yml - with your API definition:

npx spectral lint -r https://raw.githubusercontent.com/andylockran/spectral-aws-apigateway-ruleset/main/aws_important_notes.yml $your_api.yaml

Instructions

To use this ruleset, simply extend your .spectral.yml ruleset by adding a reference to this ruleset, eg:

extends: 
  - spectral:oas
  - spectral-aws-apigateway-ruleset

This pulls the definition directly from npm, do you don't have to even install it!

NPM package

spectral-aws-apigateway-ruleset

See: Spectral Instructions for npm for more details.

Contributing

The severity of each of these rules has been tweaked to follow my own usage. If you think the severity needs changing, or would prefer a more descriptive error message, please submit a PR.

For instructions on how to do so, refer to Custom Rulesets on the Spectral site.

Treeware

This package is Treeware. If you use it in production, then we ask that you buy the world a tree to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.

版本与发布记录

02strich-spectral-aws-apigateway-ruleset 共发布 2 个版本,首次发布于 2023/03/08;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.7.4-1latest2023/03/083 年前
1.7.42023/03/083 年前

关于 02strich-spectral-aws-apigateway-ruleset 的常见问题

02strich-spectral-aws-apigateway-ruleset 是什么?

一个频谱规则集,用于强制执行AWS API网关

如何安装 02strich-spectral-aws-apigateway-ruleset?

在项目目录运行 npm install 02strich-spectral-aws-apigateway-ruleset,或使用 pnpm add / yarn add / bun add。

02strich-spectral-aws-apigateway-ruleset 支持 TypeScript 吗?

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

02strich-spectral-aws-apigateway-ruleset 支持 ESM 还是 CommonJS?

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

02strich-spectral-aws-apigateway-ruleset 可以商用吗?

02strich-spectral-aws-apigateway-ruleset 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

02strich-spectral-aws-apigateway-ruleset 还在维护吗?

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