kfp_component_utils.py 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #
  2. # Copyright 2018-2022 Elyra Authors
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. component_yaml_schema = {
  16. "properties": {
  17. "name": {"type": "string"},
  18. "description": {"type": ["string", "null"]},
  19. "inputs": {
  20. "type": "array",
  21. "items": {
  22. "type": "object",
  23. "properties": {
  24. "name": {"type": "string"},
  25. "description": {"type": ["string", "null"]},
  26. "type": {"type": ["string", "null"]},
  27. "optional": {"type": ["boolean", "null"]},
  28. },
  29. },
  30. "required": ["name"],
  31. },
  32. "outputs": {
  33. "type": "array",
  34. "items": {
  35. "type": "object",
  36. "properties": {
  37. "name": {"type": "string"},
  38. "description": {"type": ["string", "null"]},
  39. "type": {"type": ["string", "null"]},
  40. "optional": {"type": ["boolean", "null"]},
  41. },
  42. },
  43. "required": ["name"],
  44. },
  45. "implementation": {
  46. "type": "object",
  47. "properties": {
  48. "container": {
  49. "type": "object",
  50. "properties": {
  51. "image": {"type": "string"},
  52. "command": {"type": "array", "items": {"type": ["string", "object"]}},
  53. "args": {"type": "array", "items": {"type": ["string", "object"]}},
  54. },
  55. }
  56. },
  57. },
  58. }
  59. }