apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: replicatedresources.shopstic.com
spec:
  group: shopstic.com
  versions:
    - name: v1
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          type: object
          properties:
            spec:
              type: object
              properties:
                kind:
                  type: string
                fromNamespace:
                  type: string
                fromName:
                  type: string
                toName:
                  type: string
                patches:
                  type: array
                  items:
                    type: object
                    properties:
                      path:
                        type: string
                      op:
                        type: string
                      from:
                        type: string
                      value:
                        x-kubernetes-preserve-unknown-fields: true
                    oneOf:
                      - properties:
                          path:
                          op:
                            enum:
                              - add
                          value: {}
                        required:
                          - path
                          - op
                          - value
                      - properties:
                          path:
                          op:
                            enum:
                              - remove
                        required:
                          - path
                          - op
                      - properties:
                          path:
                          op:
                            enum:
                              - replace
                          value: {}
                        required:
                          - path
                          - op
                          - value
                      - properties:
                          path:
                          op:
                            enum:
                              - move
                          from:
                        required:
                          - path
                          - op
                          - from
                      - properties:
                          path:
                          op:
                            enum:
                              - copy
                          from:
                        required:
                          - path
                          - op
                          - from
                      - properties:
                          path:
                          op:
                            enum:
                              - test
                          value: {}
                        required:
                          - path
                          - op
                          - value
                      - properties:
                          path:
                          op:
                            enum:
                              - _get
                          value: {}
                        required:
                          - path
                          - op
                          - value
              required:
                - kind
                - fromNamespace
                - fromName
                - toName
          required:
            - spec
  scope: Namespaced
  names:
    plural: replicatedresources
    singular: replicatedresource
    kind: ReplicatedResource
    shortNames:
      - rr

