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.

Am I correct that the root type can only be object?

See original GitHub issue

What did you do

I used type: 'array' at the root of my json schema file.

What did you expect to happen

I expected it to be documented.

What happened

nothing related to type array was documented.

What’s your environment

  • Operating System: Mac OS X El Capitan
  • node.js version: v9.4.0

Do you have example files:

For this schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "$id": "http://www.axa.ch/schemas/types/children.json",

  "type": "array",
  "title": "Children",
  "description": "Components rendered within a Component.",

  "additionalItems": false,
  "items": [
    { "$ref": "http://www.axa.ch/schemas/components/Autocomplete.json#" },
    { "$ref": "http://www.axa.ch/schemas/components/BulletRadioButtons.json#" },
    { "$ref": "http://www.axa.ch/schemas/components/Button.json#" },
    { "$ref": "http://www.axa.ch/schemas/components/Checkbox.json#" },
    { "$ref": "http://www.axa.ch/schemas/components/Datepicker.json#" },
    { "$ref": "http://www.axa.ch/schemas/components/Dropdown.json#" },
    { "$ref": "http://www.axa.ch/schemas/components/Error.json#" },
    { "$ref": "http://www.axa.ch/schemas/components/Icon.json#" },
    { "$ref": "http://www.axa.ch/schemas/components/Link.json#" },
    { "$ref": "http://www.axa.ch/schemas/components/List.json#" },
    { "$ref": "http://www.axa.ch/schemas/components/ListItem.json#" },
    { "$ref": "http://www.axa.ch/schemas/components/Map.json#" },
    { "$ref": "http://www.axa.ch/schemas/components/Markdown.json#" },
    { "$ref": "http://www.axa.ch/schemas/components/ModalDialog.json#" },
    { "$ref": "http://www.axa.ch/schemas/components/MultipleSelectList.json#" },
    { "$ref": "http://www.axa.ch/schemas/components/MultipleSelectListItem.json#" },
    { "$ref": "http://www.axa.ch/schemas/components/ProcessEnding.json#" },
    { "$ref": "http://www.axa.ch/schemas/components/SegmentedRadioButtons.json#" },
    { "$ref": "http://www.axa.ch/schemas/components/SelectList.json#" },
    { "$ref": "http://www.axa.ch/schemas/components/SelectListItem.json#" },
    { "$ref": "http://www.axa.ch/schemas/components/Textarea.json#" },
    { "$ref": "http://www.axa.ch/schemas/components/Textfield.json#" },
    { "$ref": "http://www.axa.ch/schemas/components/Typo.json#" }
  ]
}

I’m getting following Markdown

# Children Schema

http://www.axa.ch/schemas/types/children.json


Components rendered within a Component.

| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Defined In |
|----------|------------|--------|--------------|-------------------|-----------------------|------------|
| Can be instantiated | No | Experimental | No | Forbidden | Permitted | [types/children.json](types/children.json) |

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
trieloffcommented, Dec 16, 2019

🎉 This issue has been resolved in version 4.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

1reaction
bryanculvercommented, Apr 9, 2019

I just tracked this down and surprisingly it really only handles properties and definitions at the root of a JSON schema - related code:

For clarity sake, since this referenced master and not a specific commit the line highlights are no longer correct.

Here are the respective highlights as of the commit in reference:

Read more comments on GitHub >

github_iconTop Results From Across the Web

In JavaScript, what is the ultimate root, Object or Function?
The simple answer is the root of a prototype chain will always be Object.prototype , weird user manipulation aside. – Dagg Nabbit. Jan...
Read more >
Understanding the Composition Root - Manning
The Composition Root should be the sole place in the entire application that knows about the structure of the constructed object graphs.
Read more >
Analyze GC Roots | dotMemory Documentation - JetBrains
From the point of Garbage Collector, root is a reference to an object that must not and will not be collected. This makes...
Read more >
Chapter: Input Output - ROOT - CERN
If the line starts with OBJ , the object is in memory. The <class> is the name of the ROOT class (T-something). The...
Read more >
15. Classes and Objects — the Basics — How to Think Like a ...
Python is an object-oriented programming language, which means that it ... and the kinds of data they apply to, and each instance of...
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