Skip to content
Open
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
36 changes: 36 additions & 0 deletions .spectral.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
extends: spectral:oas
rules:
info-contact: off
info-description: off
oas3-api-servers: off
operation-tags: off

# Turn off oas3-unused-component because many examples are partial
# and thus do not include the use of every component
oas3-unused-component: off

# OAS conventions for AIPs

aip-parameter-names-convention:
description: Parameter names should be camelCase.
severity: warn
# Make an exception for header parameters, which should be kebab-case
given:
- $.paths[*].parameters.[?(@.in!='header')]
- $.paths.*[get,put,post,patch,delete,options,head].parameters[?(@.in!='header')]
then:
field: "name"
function: "casing"
functionOptions:
type: "camel"

aip-property-names-convention:
description: Property names should be camelCase.
severity: warn
given: $..properties.*~
then:
field: "@key"
function: "casing"
functionOptions:
type: "camel"