Skip to content

add driver object schema - #193

Merged
pablomendezroyo merged 2 commits into
masterfrom
pablo/drivers
Mar 30, 2022
Merged

pablomendezroyo merged 2 commits into
masterfrom
pablo/drivers

Conversation

@pablomendezroyo

@pablomendezroyo pablomendezroyo commented Mar 3, 2022 •

Copy link
Copy Markdown
Contributor

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

github-actions Bot commented Mar 3, 2022 •

Copy link
Copy Markdown

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
Copy Markdown
Contributor Author

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

Comment thread src/schemas/manifest.schema.json Resolved
@dapplion

dapplion commented Mar 8, 2022 •

Copy link
Copy Markdown
Contributor

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

You must add unit tests

@pablomendezroyo

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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