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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
//! Aggregated catalog definition failures with precise ownership context.
mod display;
use super::CodeNumber;
/// One independently actionable catalog definition problem.
#[derive(Debug, Clone, PartialEq, Eq)]
#[non_exhaustive]
pub enum CatalogIssue {
/// Catalog name is not canonical lowercase kebab case.
InvalidName {
/// Rejected declaration.
value: String,
},
/// Catalog prefix is not a canonical code prefix.
InvalidPrefix {
/// Rejected declaration.
value: String,
},
/// Catalog type base is not an absolute URI ending in `/`.
InvalidTypeBase {
/// Rejected declaration.
value: String,
},
/// A required metadata field is empty or otherwise invalid.
InvalidMetadata {
/// Diagnostic number with invalid metadata.
number: CodeNumber,
/// Stable metadata field name.
field: &'static str,
/// Human-readable reason for the definition author.
reason: String,
},
/// Evidence schema is outside the supported deterministic profile.
UnsupportedEvidenceSchema {
/// Diagnostic number owning the evidence type.
number: CodeNumber,
/// JSON-pointer-like location within the schema.
path: String,
/// Human-readable reason for the definition author.
reason: String,
},
/// Operation impact schema is outside the supported deterministic profile.
UnsupportedImpactSchema {
/// Diagnostic number owning the impact type.
number: CodeNumber,
/// JSON-pointer-like location within the schema.
path: String,
/// Human-readable reason for the definition author.
reason: String,
},
/// Two different diagnostic marker types claim one permanent number.
DuplicateNumber {
/// Conflicting permanent number.
number: CodeNumber,
},
/// HTTP status is not a valid client- or server-error status.
InvalidHttpStatus {
/// Diagnostic number owning the policy.
number: CodeNumber,
/// Rejected status value.
status: u16,
},
/// HTTP policy omits a header mandated by its status.
MissingMandatoryHeader {
/// Diagnostic number owning the policy.
number: CodeNumber,
/// Status whose semantics require the header.
status: u16,
/// Missing canonical header name.
header: &'static str,
},
/// A derived type URI is not a valid absolute URI.
InvalidTypeUri {
/// Diagnostic number whose URI could not be derived safely.
number: CodeNumber,
/// Rejected derived value.
value: String,
},
/// Problem-set operation ID is empty, unsafe, or too long.
InvalidProblemSetId {
/// Rejected operation ID.
value: String,
},
/// Two declarations claim the same stable API operation ID.
DuplicateProblemSetId {
/// Repeated operation ID.
id: String,
},
/// One problem set includes the same diagnostic more than once.
DuplicateProblemSetMember {
/// Owning operation ID.
problem_set: String,
/// Repeated diagnostic number.
number: CodeNumber,
},
/// A problem set includes a marker not registered on the HTTP surface.
UnregisteredProblemSetMember {
/// Owning operation ID.
problem_set: String,
/// Missing HTTP diagnostic number.
number: CodeNumber,
},
/// A derived type URI exceeds the default diagnostic wire profile.
TypeUriTooLong {
/// Diagnostic number whose URI is too large.
number: CodeNumber,
/// Maximum accepted UTF-8 byte length.
maximum: usize,
/// Actual UTF-8 byte length.
actual: usize,
},
/// Recourse could not encode and reparse its generated artifact exactly.
InvalidGeneratedArtifact {
/// Actionable closure failure.
reason: String,
},
/// The permanent namespace cannot represent every positive `u32` code.
TypeNamespaceTooLong {
/// Maximum accepted UTF-8 byte length.
maximum: usize,
/// Length of the type URI derived for `u32::MAX`.
actual: usize,
},
}