@apisyouwonthate/style-guide
Advanced tools
Comparing version 1.3.1 to 1.3.2
@@ -137,3 +137,3 @@ "use strict"; | ||
description: "Please avoid exposing IDs as an integer, UUIDs are preferred.", | ||
given: '$.paths..parameters[*].[?(@property === "name" && (@ === "id" || @ && @.match(/(_id|Id)$/)))]^.schema', | ||
given: '$.paths..parameters[*][?(@property === "name" && (@ === "id" || @.match(/(_id|Id|-id)$/)))]^.schema', | ||
then: { | ||
@@ -140,0 +140,0 @@ function: import_spectral_functions.schema, |
{ | ||
"name": "@apisyouwonthate/style-guide", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"description": "Make your HTTP APIs better, faster, stronger, whether they are still being designed (API Design-First) or your organization has flopped various mismatched APIs into production and now you're thinking some consistency would be nice. Using Spectral and OpenAPI.", | ||
@@ -5,0 +5,0 @@ "main": "dist/ruleset.js", |
@@ -26,5 +26,7 @@ # APIs You Won't Hate: API Style Guide | ||
``` | ||
echo 'extends: ["https://unpkg.com/@apisyouwonthate/style-guide"]' > .spectral.yaml | ||
echo 'extends: ["https://unpkg.com/@apisyouwonthate/style-guide@1.3.1/dist/ruleset.js"]' > .spectral.yaml | ||
``` | ||
_**Note:** You need to use the full URL with CDN hosted rulesets because Spectral [cannot follow redirects through extends](https://github.com/stoplightio/spectral/issues/2266)._ | ||
Next, use Spectral CLI to lint against your OpenAPI description. Don't have any OpenAPI? [Record some HTTP traffic to make OpenAPI](https://apisyouwonthate.com/blog/creating-openapi-from-http-traffic) and then you can switch to API Design-First going forwards. | ||
@@ -31,0 +33,0 @@ |
@@ -95,3 +95,3 @@ /* | ||
given: | ||
'$.paths..parameters[*].[?(@property === "name" && (@ === "id" || @ && @.match(/(_id|Id)$/)))]^.schema', | ||
'$.paths..parameters[*][?(@property === "name" && (@ === "id" || @.match(/(_id|Id|-id)$/)))]^.schema', | ||
then: { | ||
@@ -98,0 +98,0 @@ function: schema, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
112474
73