apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: derivedstreams.fluvio.infinyon.com
spec:
  group: fluvio.infinyon.com
  scope: Namespaced
  names:
    kind: DerivedStream
    plural: derivedstreams
    singular: derivedstream
  versions:
    - name: v1
      served: true
      storage:  true
      subresources:
          status: {}
      schema:
        openAPIV3Schema:
          required: ["spec"]
          type: object
          properties:
            status:
              type: object
              x-kubernetes-preserve-unknown-fields: true
            spec:
              type: object
              required: ["input"]
              properties:
                input:
                  type: object
                  properties:
                    topic:
                      type: object
                      required: ["name"]
                      properties:
                        name:
                          type: string
                    derivedstream:
                      type: object
                      required: ["name"]
                      properties:
                        name:
                          type: string
                  oneOf:
                    - required: ["topic"]
                    - required: ["derivedstream"]
                steps:
                  type: array
                  items:
                    type: object
                    oneOf:
                      - required: ["filter"]
                      - required: ["map"]
                      - required: ["filterMap"]
                      - required: ["aggregate"]
                      - required: ["groupBy"]
                      - required: ["join"]
                    properties:
                      filter:
                        type: object
                        required: ["module"]
                        properties:
                          module: 
                            type: string
                          id: 
                            type: string
                      map:
                        type: object
                        required: ["module"]
                        properties:
                          module:
                            type: string
                          id:
                            type: string
                      filterMap:
                        type: object
                        required: ["module"]
                        properties:
                          module:
                            type: string
                          id:
                            type: string
                      aggregate:
                        type: object
                        required: ["module"]
                        properties:
                          module:
                            type: string
                          id:
                            type: string
                      join:
                        type: object
                        required: ["module","right"]
                        properties:
                          module:
                            type: string
                          id:
                            type: string
                          right:
                            type: object
                            properties:
                              topic:
                                type: object
                                required: ["name"]
                                properties:
                                  name:
                                    type: string
                              derivedstream:
                                type: object
                                required: ["name"]
                                properties:
                                  name:
                                    type: string
                            oneOf:
                              - required: ["topic"]
                              - required: ["derivedstream"]
                          
                      
                      




                

                                

                        
