Open svrnwnsch opened 5 years ago
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