capactio / hub-manifests

Holds Capact Hub manifests
Apache License 2.0
1 stars 8 forks source link

Remove `$ocfRefs`, as this syntax was not supported by Capact #11

Closed mszostok closed 3 years ago

mszostok commented 3 years ago

Description

Changes proposed in this pull request:

Old syntax:

    parameters:
      input-parameters:
        jsonSchema:
          value: |-
            {
              "$schema": "http://json-schema.org/draft-07/schema",
              "$ocfRefs": {
                "inputType": {
                  "name": "cap.type.automation.concourse.install-input",
                  "revision": "0.1.0"
                }
              },
              "allOf": [ { "$ref": "#/$ocfRefs/inputType" } ]
            }

New syntax:

    parameters:
      input-parameters:
        typeRef:
          path: cap.type.automation.concourse.install-input
          revision: 0.1.0

For composition, we switch to supported defintion keyword and inlined schema. It will be changed back once we will add full support for $ocfRefs

Screenshot 2021-07-22 at 12 49 20

Testing

CI test will pass after merging: https://github.com/capactio/capact/pull/402

Testing locally:

  1. Checkout hub-manifests PR
  2. Checkout https://github.com/capactio/capact/pull/402
  3. Build CLI make build-tool-cli
  4. Validate manifests. Example run: ./bin/capact-darwin-amd64 validate $(find ../hub-manifests/manifests -regex ".*\.yaml") Adjust binary path and manifests location if necessary.

    Related issue(s)