mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-07 01:54:09 +00:00
make sure types are declared in spec linter
This commit is contained in:
@@ -1465,6 +1465,7 @@ paths:
|
||||
content:
|
||||
application/x-www-form-urlencoded:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- client_id
|
||||
- client_secret
|
||||
@@ -1481,6 +1482,8 @@ paths:
|
||||
grant_type:
|
||||
type: string
|
||||
description: The grant type (always 'authorization_code')
|
||||
enum:
|
||||
- authorization_code
|
||||
code:
|
||||
type: string
|
||||
description: The code provided by the authorization redirect
|
||||
|
41
redocly.yaml
41
redocly.yaml
@@ -7,3 +7,44 @@ apis:
|
||||
rules:
|
||||
info-license-url: off
|
||||
operation-4xx-response: off
|
||||
|
||||
# custom rules
|
||||
# https://redocly.com/docs/cli/rules/configurable-rules/
|
||||
rules:
|
||||
rule/required-items-in-array-schemas:
|
||||
subject:
|
||||
type: Schema
|
||||
assertions:
|
||||
required:
|
||||
- items
|
||||
where:
|
||||
- subject:
|
||||
type: Schema
|
||||
property: type
|
||||
assertions:
|
||||
const: array
|
||||
defined: true
|
||||
message: The 'items' field is required for schemas of array type.
|
||||
|
||||
rule/require-schema-type:
|
||||
subject:
|
||||
type: Schema
|
||||
property: type
|
||||
assertions:
|
||||
defined: true
|
||||
message: schema missing type
|
||||
where:
|
||||
# don't require type on schemas that reference other schemas, which already must specify type
|
||||
- subject:
|
||||
type: Schema
|
||||
property: allOf
|
||||
assertions:
|
||||
defined: false
|
||||
|
||||
rule/require-parameter-schema:
|
||||
subject:
|
||||
type: Parameter
|
||||
property: schema
|
||||
assertions:
|
||||
defined: true
|
||||
message: Parameter missing schema
|
||||
|
Reference in New Issue
Block a user