You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I start speccy via speccy serve openapi/index.openapi.yml -j --verbose it fails with:
GET /path-to-json/seeabove.json #
Expected object or boolean as schema, got array
Expected object or boolean as schema, got array
Expected object or boolean as schema, got array
undefined
Removing the part or renaming it e.g. from "propertyNames" -> "propertyName" at least starts the webserver (even if this schema is not working).
Possible implementation
If displaying some stuff for such validation is hard then at least do not fail or print better message when calling the command. Without the --verbose flag I just got returned undefined and the program exited with code 1.
Your environment
Node Version: v10.1.0
Operating system and version (e.g. Ubuntu 16.04, Windows 7): Kubuntu 18.10
speccy: 0.8.7
The text was updated successfully, but these errors were encountered:
Yep this would be expected. The -j switch was designed to convert certain JSON Schema functionality to OpenAPI, and not all of it has been done. propertyNames is JSON Schema, and that is not a keyword in OpenAPI v3. Maybe you could send a PR to https://github.com/wework/json-schema-to-openapi-schema
Detailed description
I found a bug: I added as a response schema with $ref the following json schema:
I got the entry for
propertyNames
from this stackoverflow question.When I start speccy via
speccy serve openapi/index.openapi.yml -j --verbose
it fails with:Removing the part or renaming it e.g. from
"propertyNames" -> "propertyName"
at least starts the webserver (even if this schema is not working).Possible implementation
If displaying some stuff for such validation is hard then at least do not fail or print better message when calling the command. Without the
--verbose
flag I just got returnedundefined
and the program exited with code 1.Your environment
The text was updated successfully, but these errors were encountered: