jsonary-js / jsonary

Quickly assemble clients for JSON-based APIs (powered by JSON Schema)
http://jsonary.com/
MIT License
122 stars 14 forks source link

- do not display schema_switcher if xorSchemas.length is 0 #148

Closed Ognian closed 9 years ago

Ognian commented 9 years ago

In cases like the below one I got a schema_switcher with no entries to choose from, so I changed the comparison so that no schema_switcher is displayed in that case.

"importMethod": {
                    "type": "string",
                    "title": "Art des Imports",
                    "displayOrder": 3,
                    "links": [
                        {
                            "rel": "describedby",
                            "href": "/SCHEMAQUERIES/importMethod"
                        }
                    ]
                },
Ognian commented 9 years ago

@geraintluff Hello, I put a second patch in here: When creating the default value for an object and if this is done via a custom js function the default value did not propagate since you set the "candidate" always to {} and not to the properly provided origValue....

Can You please verify this? Thanks Ognian

Ognian commented 9 years ago

@geraintluff Sorry it was my fault, I reverted the previous change... so the only change is in renderers/plain.jsonary.js