Skip to content

Commit

Permalink
Updated the ComponentSpec schema (#3698)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ark-kun authored May 6, 2020
1 parent bb73377 commit b3eeaae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 20 deletions.
22 changes: 5 additions & 17 deletions sdk/python/kfp/components/structures/components.json_schema.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"$schema": "http://json-schema.org/draft-06/schema#",
"$id": "http://kubeflow.org/pipelines/components.json_schema.json",

"$ref": "#/definitions/PipelineRunSpec",
"allOf": [{"$ref": "#/definitions/ComponentSpec"}],

"definitions": {
"TypeSpecType": {
Expand Down Expand Up @@ -133,8 +132,8 @@
"required": ["cond", "then"],
"properties": {
"cond": {"$ref": "#/definitions/IfConditionArgumentType"},
"then": {"$ref": "#/definitions/CommandlineArgumentOrArrayType"},
"else": {"$ref": "#/definitions/CommandlineArgumentOrArrayType"}
"then": {"$ref": "#/definitions/StringOrPlaceholder"},
"else": {"$ref": "#/definitions/StringOrPlaceholder"}
}
}
}
Expand Down Expand Up @@ -188,27 +187,16 @@
]
},

"SourceSpec": {
"description": "Specifies the location of the component source code.",
"type": "object",
"properties": {
"url": {"type": "string"}
},
"additionalProperties": false
},

"ComponentSpec": {
"description": "Component specification. Describes the metadata (name, description, source), the interface (inputs and outputs) and the implementation of the component.",
"type": "object",
"required": ["implementation"],
"properties": {
"name": {"type": "string"},
"description": {"type": "string"},
"source": {"$ref": "#/definitions/SourceSpec"},
"inputs": {"type": "array", "items": {"$ref": "#/definitions/InputSpec"}},
"outputs": {"type": "array", "items": {"$ref": "#/definitions/OutputSpec"}},
"implementation": {"$ref": "#/definitions/ImplementationType"},
"schemaVersion": {"type": "string", "default": "kubeflow.org/pipelines/component/v1"}
"implementation": {"$ref": "#/definitions/ImplementationType"}
},
"additionalProperties": false
},
Expand Down Expand Up @@ -333,7 +321,7 @@
"description": "When running on Kubernetes, KubernetesExecutionOptionsSpec describes changes to the configuration of a Kubernetes Pod that will execute the task.",
"type": "object",
"properties": {
"metadata": {"$ref": "#https://kubernetesjsonschema.dev/v1.14.0/_definitions.json/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"},
"metadata": {"$ref": "https://kubernetesjsonschema.dev/v1.14.0/_definitions.json#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"},
"mainContainer": {"$ref": "https://kubernetesjsonschema.dev/v1.14.0/_definitions.json#/definitions/io.k8s.api.core.v1.Container"},
"podSpec": {"$ref": "https://kubernetesjsonschema.dev/v1.14.0/_definitions.json#/definitions/io.k8s.api.core.v1.PodSpec"}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<ComponentSpec>:
name: string
description: string
source: #SourceSpec
url: string
schemaVersion: string
inputs: #InputSpec[]
<InputSpec[]>:
name: string
Expand Down

0 comments on commit b3eeaae

Please sign in to comment.