-
Notifications
You must be signed in to change notification settings - Fork 638
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1542 from DCkQ6/ISSUE-1541-default-null-in-reference
ISSUE-1541 default null in reference
- Loading branch information
Showing
4 changed files
with
69 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* /* global Feature Scenario */ | ||
|
||
Feature('issues') | ||
|
||
Scenario('GitHub issue 1541 should remain fixed @issue-1541 ', async ({ I }) => { | ||
I.amOnPage('issues/issue-gh-1541.html') | ||
I.waitForElement('.je-ready') | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"/> | ||
<title>dependentRequired</title> | ||
<script src="../../../dist/jsoneditor.js"></script> | ||
<link rel="stylesheet" id="theme-link" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"> | ||
<link rel="stylesheet" id="iconlib-link" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css"> | ||
</head> | ||
<body> | ||
|
||
<div class="container"> | ||
<h1>Test</h1> | ||
<div id='editor-container'></div> | ||
|
||
<div class="form-group"> | ||
<label for="textarea-value">Value</label> | ||
<textarea class="form-control" id="textarea-value" cols="30" rows="10"></textarea> | ||
</div> | ||
</div> | ||
|
||
<script> | ||
var editorContainer = document.querySelector('#editor-container') | ||
var textareaValue = document.querySelector('#textarea-value') | ||
var schema = { | ||
'title': 'Dependency chain support', | ||
'type': 'object', | ||
'properties': { | ||
"reference": { | ||
"title": "Reference", | ||
"$ref": "issue-gh-1541.json" | ||
} | ||
} | ||
} | ||
|
||
var editor = new JSONEditor(editorContainer, { | ||
schema: schema, | ||
theme: 'bootstrap4', | ||
iconlib: 'fontawesome', | ||
show_errors: 'always', | ||
show_opt_in: false, | ||
ajax: true, | ||
}) | ||
|
||
editor.on('change', function () { | ||
textareaValue.value = JSON.stringify(editor.getValue()) | ||
}) | ||
</script> | ||
|
||
</body> | ||
</html>` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"type": "external-schema", | ||
"properties": { | ||
"value": { | ||
"type": ["string", "null"], | ||
"default": null | ||
} | ||
} | ||
} |