Skip to content

Conversation

@mallachari
Copy link

@mallachari mallachari commented Jul 10, 2019

Related to STU-362

Changes:

  • fix issue causing not rendering schema if object node does not have a type specified

Context:
Issue appeared only for arrays that contained objects without specified type. This way node subtype property was undefined and the process of node children rendering stopped.

Before:
Screenshot from 2019-07-12 12-57-08

After:
Screenshot from 2019-07-12 12-55-59

@mallachari mallachari merged commit 1a08e63 into master Jul 12, 2019
@mallachari mallachari deleted the fix/stu-362/array-objects-without-type branch July 12, 2019 13:43
@stoplight-bot
Copy link
Collaborator

🎉 This PR is included in version 2.5.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

'$ref' in parsedSchema.items
? `$ref( ${parsedSchema.items.$ref} )`
: parsedSchema.items.type ||
(parsedSchema.items.properties && 'object') ||
Copy link
Contributor

@P0lip P0lip Jul 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(parsedSchema.items.properties && 'object')
The RHS will always be truthy.

EDIT:
just realized you want to have object returned here, so it's okay.

@P0lip
Copy link
Contributor

P0lip commented Jul 12, 2019

This PR will need to be revamped a bit, as we have inferType which should be used here.
I'll refactor this tomorrow.

Suggest adding Chris or Nick to the PRs, they have a fairly decent experience with JSV, so they might spot such nuances.

cc @mallachari @chris-miaskowski

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants