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

Switch to a supported OpenAPI validator. #430

Merged
merged 3 commits into from
Jul 11, 2024
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
9 changes: 9 additions & 0 deletions spec/.spectral.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
extends: '@ibm-cloud/openapi-ruleset'
rules:
# We generally follow the naming conventions from the upstream spec
# which does not match the IBM API naming conventions. So we turn off
# these specific validation rules.
ibm-parameter-casing-convention: off
ibm-property-casing-convention: off
ibm-enum-casing-convention: off
ibm-path-segment-casing-convention: off
109 changes: 0 additions & 109 deletions spec/.validaterc

This file was deleted.

2 changes: 1 addition & 1 deletion spec/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ OPENAPI = $(STATIC_BASE_DIR)/openapi.yaml
OPENAPI_TRANSACTIONAL = $(STATIC_BASE_DIR)/openapitransactional.yaml

YQ ?= docker run --rm -v ${PWD}:/workdir 974517877189.dkr.ecr.eu-central-1.amazonaws.com/external/openapi/yq:4.44.1
OPENAPI_VALIDATOR ?= docker run --volume "$(PWD)":/data 974517877189.dkr.ecr.eu-central-1.amazonaws.com/external/openapi/openapi-validator:0.54.0
OPENAPI_VALIDATOR ?= docker run --volume "$(PWD)":/data 974517877189.dkr.ecr.eu-central-1.amazonaws.com/external/openapi/openapi-validator:1.19.2

all: help

Expand Down
7 changes: 4 additions & 3 deletions spec/components/schemas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ components:
example: 3dd6e1ead0760d278344394b0e7f017b5b6049e4fed3d2083b564fc268f07334
pattern: ^[a-f0-9]+$
title: sha256
format: digest
format: binary
minLength: 64
maxLength: 64
type: string
checksumMultihash:
description: >-
Expand Down Expand Up @@ -666,10 +668,8 @@ components:
$ref: "#/components/schemas/itemGeometry"
properties:
$ref: "#/components/schemas/itemProperties"
readOnly: true
stac_version:
$ref: "#/components/schemas/stac_version"
readOnly: true
type:
$ref: "#/components/schemas/itemType"
required:
Expand Down Expand Up @@ -1079,6 +1079,7 @@ components:
- created
- updated
type: object
readOnly: true
itemType:
title: type
description: The GeoJSON type
Expand Down
7 changes: 4 additions & 3 deletions spec/static/spec/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,9 @@ components:
example: 3dd6e1ead0760d278344394b0e7f017b5b6049e4fed3d2083b564fc268f07334
pattern: ^[a-f0-9]+$
title: sha256
format: digest
format: binary
minLength: 64
maxLength: 64
type: string
checksumMultihash:
description: >-
Expand Down Expand Up @@ -1094,10 +1096,8 @@ components:
$ref: "#/components/schemas/itemGeometry"
properties:
$ref: "#/components/schemas/itemProperties"
readOnly: true
stac_version:
$ref: "#/components/schemas/stac_version"
readOnly: true
type:
$ref: "#/components/schemas/itemType"
required:
Expand Down Expand Up @@ -1494,6 +1494,7 @@ components:
- created
- updated
type: object
readOnly: true
itemType:
title: type
description: The GeoJSON type
Expand Down
7 changes: 4 additions & 3 deletions spec/static/spec/v1/openapitransactional.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1874,7 +1874,9 @@ components:
example: 3dd6e1ead0760d278344394b0e7f017b5b6049e4fed3d2083b564fc268f07334
pattern: ^[a-f0-9]+$
title: sha256
format: digest
format: binary
minLength: 64
maxLength: 64
type: string
checksumMultihash:
description: >-
Expand Down Expand Up @@ -2301,10 +2303,8 @@ components:
$ref: "#/components/schemas/itemGeometry"
properties:
$ref: "#/components/schemas/itemProperties"
readOnly: true
stac_version:
$ref: "#/components/schemas/stac_version"
readOnly: true
type:
$ref: "#/components/schemas/itemType"
required:
Expand Down Expand Up @@ -2701,6 +2701,7 @@ components:
- created
- updated
type: object
readOnly: true
itemType:
title: type
description: The GeoJSON type
Expand Down