From edf5e6dee5695d9fd0419857f0895420f4744294 Mon Sep 17 00:00:00 2001 From: Andy Loughran Date: Tue, 7 Mar 2023 21:16:52 +0000 Subject: [PATCH 1/3] AWS now confirm support of oneOf in OAS3 --- aws_important_notes.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/aws_important_notes.yml b/aws_important_notes.yml index 23c0585..3112a13 100644 --- a/aws_important_notes.yml +++ b/aws_important_notes.yml @@ -119,13 +119,6 @@ rules: - ipv6 - uri - aws-oneOf: - description: 'OneOf is not supported by API Gateway' - severity: error - given: $..oneOf - then: - function: undefined - aws-readOnly: description: 'readOnly is not supported by API Gateway' severity: warn From bad82e321b941ef98f901e60ec151ad15b1f04e9 Mon Sep 17 00:00:00 2001 From: Andy Loughran Date: Tue, 7 Mar 2023 21:18:50 +0000 Subject: [PATCH 2/3] Updated README --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 06c1734..3725c02 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ When working with AWS API Gateway, it uses a number of features that are a step Usefully, the features are documented here [AWS API Gateway Important Notes](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-known-issues.html), but it's very easy for API developers to forget, or miss them. +This linter is designed to support only the OpenAPI v3 specificiation on AWS API Gateway. AWS' documentation is not particularly clear on the differences between the two implementations, but as historical documentation gets updated this library will hopefully become more accurate and relevant to v3. If you're using V2, please note that this linter is likely to provide you false-positive, and false-negative results. + ## Spectral [Spectral](https://stoplight.io/open-source/spectral/) is an Open Source API Linter. @@ -22,7 +24,7 @@ If you've got npx installed, then you can run this ruleset with a single command To use this ruleset, simply extend your .spectral.yml ruleset by adding a reference to this ruleset, eg: ``` -extends: +extends: - spectral:oas - spectral-aws-apigateway-ruleset ``` @@ -37,10 +39,10 @@ See: [Spectral Instructions for npm](https://meta.stoplight.io/docs/spectral/doc ## 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. +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](https://meta.stoplight.io/docs/spectral/docs/guides/4-custom-rulesets.md) on the Spectral site. -## Treeware +## Treeware -This package is [Treeware](https://treeware.earth). If you use it in production, then we ask that you [**buy the world a tree**](https://plant.treeware.earth/andylockran/spectral-aws-apigateway-ruleset) to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats. \ No newline at end of file +This package is [Treeware](https://treeware.earth). If you use it in production, then we ask that you [**buy the world a tree**](https://plant.treeware.earth/andylockran/spectral-aws-apigateway-ruleset) to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats. From 75b85f4d8c4b05636d5d87ce90f86a2dfeb72b17 Mon Sep 17 00:00:00 2001 From: Andy Loughran Date: Tue, 7 Mar 2023 21:19:26 +0000 Subject: [PATCH 3/3] 1.7.10 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index d074148..380476c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "spectral-aws-apigateway-ruleset", - "version": "1.7.9", + "version": "1.7.10", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "spectral-aws-apigateway-ruleset", - "version": "1.7.9", + "version": "1.7.10", "license": "Apache-2.0", "dependencies": { "ajv": "^8.5.0", diff --git a/package.json b/package.json index c19f4b0..2b812ee 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "spectral-aws-apigateway-ruleset", - "version": "1.7.9", + "version": "1.7.10", "description": "A spectral ruleset to enforce the AWS API Gateway Important Notes", "main": "aws_important_notes.yml", "scripts": {