Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/master-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,29 @@ jobs:
if: ${{ env.UNKNOWN_LICENSES != '0 Unknown Licenses' }}
run: exit 1

openapi-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
id: filter
with:
filters: |
openapi:
- 'openapi.yaml'
- '.spectral.yaml'
- name: Set up Node.js
if: steps.filter.outputs.openapi == 'true'
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install IBM OpenAPI Validator
if: steps.filter.outputs.openapi == 'true'
run: npm install --no-save ibm-openapi-validator
- name: Validate OpenAPI specification
if: steps.filter.outputs.openapi == 'true'
run: ./node_modules/.bin/lint-openapi openapi.yaml

# Build verification with Java bytecode target matrix
# Verifies bytecode compatibility for both Java 11 and Java 17 targets
build:
Expand Down
29 changes: 29 additions & 0 deletions .spectral.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Custom Spectral ruleset for the Apache Nutch REST API.
# Extends the IBM Cloud Validation Ruleset and disables rules that conflict
# with the existing Nutch Java wire format (camelCase properties, UPPER_CASE
# enums, camelCase parameters, bare-array responses, map-typed responses,
# and consecutive path parameter segments).

extends: "@ibm-cloud/openapi-ruleset"
rules:
ibm-property-casing-convention: off
ibm-enum-casing-convention: off
ibm-parameter-casing-convention: off
ibm-no-array-responses: off
ibm-accept-and-return-models: off
ibm-no-consecutive-path-parameter-segments: off
Loading
Loading