forked from IBM/openapi-validator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
results-object.yaml
94 lines (93 loc) · 2.56 KB
/
results-object.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
$schema: http://json-schema.org/draft-07/schema#
title: IBM OpenAPI Validator Results Schema
description: The results produced by running the validator on an API definition
type: object
additionalProperties: false
required:
- error
- warning
- info
- hint
- hasResults
properties:
error:
$ref: '#/$defs/ValidationData'
warning:
$ref: '#/$defs/ValidationData'
info:
$ref: '#/$defs/ValidationData'
hint:
$ref: '#/$defs/ValidationData'
hasResults:
type: boolean
description: A convenience flag indicating there is at least one result at any severity level
$defs:
ValidationData:
type: object
additionalProperties: false
required:
- results
- summary
properties:
results:
type: array
description: List of results with a given severity
items:
$ref: '#/$defs/ValidationResult'
summary:
type: object
additionalProperties: false
required:
- entries
- total
properties:
entries:
type: array
description: List of metadata summarizing the results at a given severity
items:
$ref: '#/$defs/SummaryEntry'
total:
type: integer
description: The total number of validations with a given severity
ValidationResult:
type: object
additionalProperties: false
required:
- message
- path
- rule
- line
properties:
message:
type: string
description: A description of the problem discovered in the API
path:
type: array
items:
type: string
description: An array containing the field names of the API document
that lead to the location of the discovered problem
rule:
type: string
description: The rule identifier in the Spectral ruleset
line:
type: integer
description: The line number in the original file that the problem
was discovered on
SummaryEntry:
type: object
additionalProperties: false
required:
- generalizedMessage
- count
- percentage
properties:
generalizedMessage:
type: string
description: Generalized version of a rule message that has been reported by the validator
count:
type: integer
description: The number of times this specific rule has been violated in the API
percentage:
type: integer
description: The percentage of total violations for a given severity that this rule comprises