Skip to content

Commit 48e1aa9

Browse files
alexecsarabala1979
authored andcommitted
fix: Minor corrections to Swagger/JSON schema (argoproj#7027)
Signed-off-by: Alex Collins <[email protected]>
1 parent 10f5db6 commit 48e1aa9

File tree

5 files changed

+9
-136
lines changed

5 files changed

+9
-136
lines changed

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,8 +541,11 @@ dist/swaggifed.swagger.json: dist/mixed.swagger.json hack/swaggify.sh
541541
dist/kubeified.swagger.json: dist/swaggifed.swagger.json dist/kubernetes.swagger.json
542542
go run ./hack/swagger kubeifyswagger dist/swaggifed.swagger.json dist/kubeified.swagger.json
543543

544-
api/openapi-spec/swagger.json: $(GOPATH)/bin/swagger dist/kubeified.swagger.json
545-
swagger flatten --with-flatten minimal --with-flatten remove-unused dist/kubeified.swagger.json -o api/openapi-spec/swagger.json
544+
dist/swagger.0.json: $(GOPATH)/bin/swagger dist/kubeified.swagger.json
545+
swagger flatten --with-flatten minimal --with-flatten remove-unused dist/kubeified.swagger.json -o dist/swagger.0.json
546+
547+
api/openapi-spec/swagger.json: $(GOPATH)/bin/swagger dist/swagger.0.json
548+
swagger flatten --with-flatten remove-unused dist/swagger.0.json -o api/openapi-spec/swagger.json
546549

547550
api/jsonschema/schema.json: api/openapi-spec/swagger.json hack/jsonschema/main.go
548551
go run ./hack/jsonschema

api/jsonschema/schema.json

Lines changed: 0 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -7653,41 +7653,6 @@
76537653
},
76547654
"type": "object"
76557655
},
7656-
"io.argoproj.workflow.v1alpha1.WorkflowTaskSet": {
7657-
"properties": {
7658-
"apiVersion": {
7659-
"const": "argoproj.io/v1alpha1",
7660-
"description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.io.k8s.community/contributors/devel/sig-architecture/api-conventions.md#resources",
7661-
"type": "string"
7662-
},
7663-
"kind": {
7664-
"const": "WorkflowTaskSet",
7665-
"description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.io.k8s.community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
7666-
"type": "string"
7667-
},
7668-
"metadata": {
7669-
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"
7670-
},
7671-
"spec": {
7672-
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.WorkflowTaskSetSpec"
7673-
},
7674-
"status": {
7675-
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.WorkflowTaskSetStatus"
7676-
}
7677-
},
7678-
"required": [
7679-
"metadata",
7680-
"spec"
7681-
],
7682-
"type": "object",
7683-
"x-kubernetes-group-version-kind": [
7684-
{
7685-
"group": "argoproj.io",
7686-
"kind": "WorkflowTaskSet",
7687-
"version": "v1alpha1"
7688-
}
7689-
]
7690-
},
76917656
"io.argoproj.workflow.v1alpha1.WorkflowTaskSetSpec": {
76927657
"properties": {
76937658
"tasks": {
@@ -10795,39 +10760,6 @@
1079510760
},
1079610761
"type": "object"
1079710762
},
10798-
"io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails": {
10799-
"description": "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.",
10800-
"properties": {
10801-
"causes": {
10802-
"description": "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.",
10803-
"items": {
10804-
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.StatusCause"
10805-
},
10806-
"type": "array"
10807-
},
10808-
"group": {
10809-
"description": "The group attribute of the resource associated with the status StatusReason.",
10810-
"type": "string"
10811-
},
10812-
"kind": {
10813-
"description": "The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
10814-
"type": "string"
10815-
},
10816-
"name": {
10817-
"description": "The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).",
10818-
"type": "string"
10819-
},
10820-
"retryAfterSeconds": {
10821-
"description": "If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action.",
10822-
"type": "integer"
10823-
},
10824-
"uid": {
10825-
"description": "UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids",
10826-
"type": "string"
10827-
}
10828-
},
10829-
"type": "object"
10830-
},
1083110763
"io.k8s.apimachinery.pkg.apis.meta.v1.Time": {
1083210764
"description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.",
1083310765
"format": "date-time",
@@ -10976,9 +10908,6 @@
1097610908
},
1097710909
{
1097810910
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.WorkflowTemplate"
10979-
},
10980-
{
10981-
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.WorkflowTaskSet"
1098210911
}
1098310912
],
1098410913
"type": "object"

api/openapi-spec/swagger.json

Lines changed: 2 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"title": "Argo Server API",
1616
"version": "VERSION"
1717
},
18+
"host": "localhost:2746",
1819
"paths": {
1920
"/api/v1/archived-workflows": {
2021
"get": {
@@ -4086,7 +4087,7 @@
40864087
},
40874088
{
40884089
"type": "string",
4089-
"name": "name",
4090+
"name": "uid",
40904091
"in": "path",
40914092
"required": true
40924093
},
@@ -11779,32 +11780,6 @@
1177911780
}
1178011781
}
1178111782
},
11782-
"io.argoproj.workflow.v1alpha1.WorkflowTaskSet": {
11783-
"type": "object",
11784-
"required": [
11785-
"metadata",
11786-
"spec"
11787-
],
11788-
"properties": {
11789-
"apiVersion": {
11790-
"description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.io.k8s.community/contributors/devel/sig-architecture/api-conventions.md#resources",
11791-
"type": "string"
11792-
},
11793-
"kind": {
11794-
"description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.io.k8s.community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
11795-
"type": "string"
11796-
},
11797-
"metadata": {
11798-
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"
11799-
},
11800-
"spec": {
11801-
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.WorkflowTaskSetSpec"
11802-
},
11803-
"status": {
11804-
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.WorkflowTaskSetStatus"
11805-
}
11806-
}
11807-
},
1180811783
"io.argoproj.workflow.v1alpha1.WorkflowTaskSetSpec": {
1180911784
"type": "object",
1181011785
"properties": {
@@ -14903,39 +14878,6 @@
1490314878
}
1490414879
}
1490514880
},
14906-
"io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails": {
14907-
"description": "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.",
14908-
"type": "object",
14909-
"properties": {
14910-
"causes": {
14911-
"description": "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.",
14912-
"type": "array",
14913-
"items": {
14914-
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.StatusCause"
14915-
}
14916-
},
14917-
"group": {
14918-
"description": "The group attribute of the resource associated with the status StatusReason.",
14919-
"type": "string"
14920-
},
14921-
"kind": {
14922-
"description": "The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
14923-
"type": "string"
14924-
},
14925-
"name": {
14926-
"description": "The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).",
14927-
"type": "string"
14928-
},
14929-
"retryAfterSeconds": {
14930-
"description": "If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action.",
14931-
"type": "integer"
14932-
},
14933-
"uid": {
14934-
"description": "UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids",
14935-
"type": "string"
14936-
}
14937-
}
14938-
},
1493914881
"io.k8s.apimachinery.pkg.apis.meta.v1.Time": {
1494014882
"description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.",
1494114883
"type": "string",

hack/jsonschema/main.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ func main() {
2525
"Workflow",
2626
"WorkflowEventBinding",
2727
"WorkflowTemplate",
28-
"WorkflowTaskSet",
2928
} {
3029
v := definitions.(obj)["io.argoproj.workflow.v1alpha1."+kind].(obj)
3130
v["x-kubernetes-group-version-kind"] = []map[string]string{
@@ -49,7 +48,6 @@ func main() {
4948
obj{"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.Workflow"},
5049
obj{"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.WorkflowEventBinding"},
5150
obj{"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.WorkflowTemplate"},
52-
obj{"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.WorkflowTaskSet"},
5351
},
5452
"definitions": definitions,
5553
}

pkg/apiclient/_.primary.swagger.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"http",
1111
"https"
1212
],
13+
"host": "localhost:2746",
1314
"info": {
1415
"title": "Argo Server API",
1516
"description": "You can get examples of requests and responses by using the CLI with `--gloglevel=9`, e.g. `argo list --gloglevel=9`",
@@ -197,7 +198,7 @@
197198
},
198199
{
199200
"type": "string",
200-
"name": "name",
201+
"name": "uid",
201202
"in": "path",
202203
"required": true
203204
},

0 commit comments

Comments
 (0)