Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add driver object schema #193

Merged
merged 2 commits into from
Mar 30, 2022
Merged

add driver object schema #193

merged 2 commits into from
Mar 30, 2022

Conversation

pablomendezroyo
Copy link
Contributor

@pablomendezroyo pablomendezroyo commented Mar 3, 2022

Expand chain option with an object schema to define the values where the beaconchain driver endpoint will be exposed.

    "chain": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "ethereum",
            "ethereum-beacon-chain",
            "ethereum2-beacon-chain-prysm",
            "bitcoin",
            "monero"
          ]
        },
        {
          "type": "object",
          "properties": {
            "driver": {
              "type": "string",
              "enum": [
                "bitcoin",
                "ethereum",
                "ethereum-beacon-chain",
                "ethereum2-beacon-chain-prysm",
                "monero"
              ],
              "description": "The blockchain driver used by this DAppNode Package",
              "examples": ["ethereum", "bitcoin"]
            },
            "serviceName": {
              "type": "string",
              "description": "The name of the blockchain service used by this DAppNode Package"
            },
            "portNumber": {
              "type": "integer",
              "description": "The port number of the blockchain service used by this DAppNode Package"
            }
          },
          "required": ["driver"]
        }
      ],

Backwards compatible with the already existing driver string

@pablomendezroyo pablomendezroyo linked an issue Mar 3, 2022 that may be closed by this pull request
@github-actions
Copy link

github-actions bot commented Mar 3, 2022

DAppNode bot has built and pinned the release to an IPFS node, for commit: e37fda5

This is a development version and should only be installed for testing purposes, install link

/ipfs/QmcYCMuZdfip2JaBSozXLQ4T7XBFJEmY2j3b2bcJDbx26j

(by dappnodebot/build-action)

@pablomendezroyo
Copy link
Contributor Author

validation schema: https://www.jsonschemavalidator.net/s/opDlwmum

@dapplion
Copy link
Contributor

dapplion commented Mar 8, 2022

Still doesn't work for me https://www.jsonschemavalidator.net/s/WcD3P0Xt

You must add unit tests

@pablomendezroyo
Copy link
Contributor Author

Still doesn't work for me https://www.jsonschemavalidator.net/s/WcD3P0Xt

You must add unit tests

I think you are using wrong the manifest. Double-check you copied the good one. https://www.jsonschemavalidator.net/s/WcD3P0Xt

Will format json and add unit test on next commit

@dapplion
Copy link
Contributor

Please add unit tests, and format to 2 tab indentation for consistency with the rest of the DAppNode codebase

Update manifest.schema.json

format manifest

use of two spaces identation

validate chain driver

not use only
@pablomendezroyo
Copy link
Contributor Author

Please add unit tests, and format to 2 tab indentation for consistency with the rest of the DAppNode codebase

done

@pablomendezroyo pablomendezroyo merged commit 7db09dc into master Mar 30, 2022
@pablomendezroyo pablomendezroyo deleted the pablo/drivers branch March 30, 2022 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update manifest drivers options
2 participants