-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
handling inline references in the main schema even when subSchemas ar…
…e provided
- Loading branch information
Showing
2 changed files
with
33 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
dd68e6c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the id.length > 1 check seems to have broken swaggerize-hapi parsing of a swagger spec to generation the validations.
In this case "value" passed to refresolver:
/definitions/Workflow
Since the id is "#' it doesn't use subschemas. This means it never finds a fragment, so fragment is returned from refresolver as "undefined", which means the "current" arg passed to resolver is "undefined", so then trying to evaluate "currrent.type" in the first conditional check causes the following error:
TypeError: Cannot read property 'type' of undefined