Skip to content

Commit 8fa3005

Browse files
author
Clayton Pence
committed
Better comments, clearer intention with code/name
1 parent e499336 commit 8fa3005

File tree

6 files changed

+478
-165
lines changed

6 files changed

+478
-165
lines changed

analysis/v1alpha1/message.gen.json

+20-11
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,23 @@
99
"istio.analysis.v1alpha1.AnalysisMessageBase": {
1010
"description": "AnalysisMessageBase describes some common information that is needed for all messages. All information should be static with respect to the error code.",
1111
"type": "object",
12+
"properties": {
13+
"type": {
14+
"$ref": "#/components/schemas/istio.analysis.v1alpha1.AnalysisMessageBase.Type"
15+
},
16+
"level": {
17+
"$ref": "#/components/schemas/istio.analysis.v1alpha1.AnalysisMessageBase.Level"
18+
},
19+
"documentationUrl": {
20+
"description": "A url pointing to the Istio documentation for this specific error type. Should be of the form `^http(s)?://(preliminary\\.)?istio.io/docs/reference/config/analysis/` Required.",
21+
"type": "string",
22+
"format": "string"
23+
}
24+
}
25+
},
26+
"istio.analysis.v1alpha1.AnalysisMessageBase.Type": {
27+
"description": "A unique identifier for the type of message. Name is intended to be human-readable, code is intended to be machine readable. There should be a one-to-one mapping between name and code. (i.e. do not re-use names or codes between message types.)",
28+
"type": "object",
1229
"properties": {
1330
"name": {
1431
"description": "A human-readable name for the message type. e.g. \"InternalError\", \"PodMissingProxy\". This should be the same for all messages of the same type. Required.",
@@ -19,14 +36,6 @@
1936
"description": "A 7 character code matching `^IST[0-9]{4}$` intended to uniquely identify the message type. (e.g. \"IST0001\" is mapped to the \"InternalError\" message type.) 0000-0100 are reserved. Required.",
2037
"type": "string",
2138
"format": "string"
22-
},
23-
"level": {
24-
"$ref": "#/components/schemas/istio.analysis.v1alpha1.AnalysisMessageBase.Level"
25-
},
26-
"documentationUrl": {
27-
"description": "A url pointing to the Istio documentation for this specific error type. Should be of the form `^http(s)?://(preliminary\\.)?istio.io/docs/reference/config/analysis/` Required.",
28-
"type": "string",
29-
"format": "string"
3039
}
3140
}
3241
},
@@ -53,7 +62,7 @@
5362
"format": "string"
5463
},
5564
"template": {
56-
"description": "A go-style template string defining how to combine the args for a particular message into a log line. Required.",
65+
"description": "A go-style template string (https://golang.org/pkg/fmt/#hdr-Printing) defining how to combine the args for a particular message into a log line. Required.",
5766
"type": "string",
5867
"format": "string"
5968
},
@@ -75,7 +84,7 @@
7584
"format": "string"
7685
},
7786
"goType": {
78-
"description": "Required. Should be a golang type, used in code generation",
87+
"description": "Required. Should be a golang type, used in code generation. Ideally this will change to a less language-pinned type before this gets out of alpha, but for compatibility with current istio/istio code it's go_type for now.",
7988
"type": "string",
8089
"format": "string"
8190
}
@@ -93,7 +102,7 @@
93102
"type": "object"
94103
},
95104
"resourcePaths": {
96-
"description": "A list of strings specifying the path for resources which were the cause of message generation. At least one is required.",
105+
"description": "A list of strings specifying the resource identifiers that were the cause of message generation. At least one is required.",
97106
"type": "array",
98107
"items": {
99108
"type": "string",

0 commit comments

Comments
 (0)