question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mergekeys not allowed when JSON schema's are used

See original GitHub issue

When validating a YAML file with a JSON schema like this:

{
    "type": "object",
    "properties": {
        "prop1": {
            "type": "string"
        },
        "prop2": {
            "type": "string"
        }
    },
    "additionalProperties": false,
    "required": [
        "prop1"
    ],
    "$schema": "http://json-schema.org/draft-07/schema#"
}

It is not possible to use merge keys, it says that ‘<<’ is not a valid property:

image

Would it be possible to ignore ‘<<’ properties when validating schema’s?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
JPinkneycommented, Jan 20, 2020

I think I have a fix for this that should make it into the next release, when I was switching everything from using a JSON 4 parser to a JSON 7 parser I missed a part of code that processes merge keys correctly

2reactions
JPinkneycommented, Feb 19, 2020

The new version has been released so I’m closing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

YAML Anchor, Aliases and Merge Keys
Some of YAML's properties not in JSON are anchors, aliases and merge keys that can work well together. These allow references and mixins...
Read more >
object — Understanding JSON Schema 2020-12 ...
Setting the additionalProperties schema to false means no additional properties will be allowed.
Read more >
XSL Transformations (XSLT) Version 3.0
[ERR XTSE0010] It is a static error if an XSLT-defined element is used in a context where it is not permitted, if a...
Read more >
Only allow properties that are declared in JSON schema
For instance if a user passes a "name" property in their json object it will fail this schema because "name" is not listed...
Read more >
JSON Schema Serializer and Deserializer
In order to allow the JSON Schema deserializer to work with topics with ... on the JSON Schema that specifies the fully-qualified Java...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found