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

Local node inheritance ignores internal nodes sometimes #64

Closed
dakusui opened this issue Nov 16, 2019 · 1 comment
Closed

Local node inheritance ignores internal nodes sometimes #64

dakusui opened this issue Nov 16, 2019 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@dakusui
Copy link
Owner

dakusui commented Nov 16, 2019

  • Input
{
  "$local": {
    "database_default": {
      "server": {
        "ip": "192.168.1.5",
        "port": 2000
      },
      "db_name": "test",
      "user": {
        "name": "root",
        "password": "root"
      }
    }
  },
  "foo_database": {
    "$extends": "database_default",
    "server": {
      "port": 2001
    },
    "db_name": "foo",
    "user": {
      "password": "foo_root"
    }
  }
}
  • Expectation
{
  "foo_database": {
    "server": {
      "ip": "192.168.1.5",
      "port": 2001
    },
    "db_name": "foo",
    "user": {
      "name": "root",
      "password": "foo_root"
    }
  }
}
  • Actual output
jq: error (at <stdin>:1): Cannot iterate over string ("database_d...)
{
  "foo_database": {
    "server": {
      "port": 2001
    },
    "db_name": "foo",
    "user": {
      "password": "foo_root"
    }
  }
}
@dakusui dakusui self-assigned this Nov 16, 2019
@dakusui dakusui added the bug Something isn't working label Nov 16, 2019
@dakusui
Copy link
Owner Author

dakusui commented Nov 16, 2019

This was not bug...

    "$extends": "database_default",

should have been

    "$extends": ["database_default"],

The message is not straight forward, but it's also not a bug because you can do --validate=strict.

@dakusui dakusui closed this as completed Nov 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant