Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update operation-operationId-valid-in-url Message #2606

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
56 changes: 38 additions & 18 deletions .circleci/config.yml
@@ -1,7 +1,7 @@
version: 2.1

orbs:
windows: circleci/windows@2.4.1
windows: circleci/windows@5.0

executors:
linux:
Expand Down Expand Up @@ -76,23 +76,38 @@ commands:
name: Restore pkg cache
keys:
- &pkg-cache-key pkg-cache-<< parameters.targets >>-<< parameters.node-version >>
- run:
name: Create the Spectral Binary
environment:
PKG_CACHE_PATH: *pkg-cache-path
command: |
NODE_VERSION=$(echo "<< parameters.node-version >>" | awk -F "." '{ print $1 }')
TARGETS=$(echo "<< parameters.targets >>" | awk -v node_version="$NODE_VERSION" -F "," '{for (i=1;i<=NF;i++) printf "node" node_version "-" $i "," }' | sed "s/,$/\n/")
export ARCH=$(echo << parameters.targets >> | awk 'match($0, /-(arm64|x64)/){ print substr($0, RSTART+1, RLENGTH-1) }')

if [ "<< parameters.bytecode >>" = true ]
then
yarn workspace @stoplight/spectral-cli pkg . --public --public-packages "*" --targets $TARGETS --output binaries/spectral
else
yarn workspace @stoplight/spectral-cli pkg . --no-bytecode --public --public-packages "*" --targets $TARGETS --output binaries/spectral
fi

(cd packages/cli/binaries && ls . | sed -n -E 's/^(spectral)-(alpine|linux|macos)$/mv "\1-\2" "\1-\2"-$ARCH/p' | sh)
- when:
condition: &is-windows
equal:
- windows
- << parameters.targets >>
steps:
- run:
name: Create the Spectral Binary
environment:
PKG_CACHE_PATH: *pkg-cache-path
command: |
yarn workspace @stoplight/spectral-cli pkg . --public --public-packages "*" --targets windows --output binaries/spectral
- unless:
condition: *is-windows
steps:
- run:
name: Create the Spectral Binary
environment:
PKG_CACHE_PATH: *pkg-cache-path
command: |
NODE_VERSION=$(echo "<< parameters.node-version >>" | awk -F "." '{ print $1 }')
TARGETS=$(echo "<< parameters.targets >>" | awk -v node_version="$NODE_VERSION" -F "," '{for (i=1;i<=NF;i++) printf "node" node_version "-" $i "," }' | sed "s/,$/\n/")
export ARCH=$(echo << parameters.targets >> | awk 'match($0, /-(arm64|x64)/){ print substr($0, RSTART+1, RLENGTH-1) }')

if [ "<< parameters.bytecode >>" = true ]
then
yarn workspace @stoplight/spectral-cli pkg . --public --public-packages "*" --targets $TARGETS --output binaries/spectral
else
yarn workspace @stoplight/spectral-cli pkg . --no-bytecode --public --public-packages "*" --targets $TARGETS --output binaries/spectral
fi

(cd packages/cli/binaries && ls . | sed -n -E 's/^(spectral)-(alpine|linux|macos)$/mv "\1-\2" "\1-\2"-$ARCH/p' | sh)
- save_cache:
name: Retain pkg cache
key: *pkg-cache-key
Expand Down Expand Up @@ -264,6 +279,11 @@ jobs:
name: windows/default
steps:
- checkout
- run:
name: Enable Corepack
command: |
npm install -g corepack
corepack enable
- cached-dependencies
- build
- test-node:
Expand Down
2 changes: 1 addition & 1 deletion packages/rulesets/src/oas/index.ts
Expand Up @@ -265,7 +265,7 @@ const ruleset = {
},
},
'operation-operationId-valid-in-url': {
message: 'operationId must not characters that are invalid when used in URL.',
message: 'operationId must not contain characters that are invalid when used in URL.',
recommended: true,
given: '#OperationObject',
then: {
Expand Down