Open jianyexi opened 4 years ago
I'll take a peek. I'm not sure why it would fail. Can you give more details on how you tested this? (The weird schemaPath
value isn't from sway
but z-schema
and it shouldn't mislead you.) Can you give the full parameter definition and the requested path made? Or maybe even a simple reproduction snippet of code?
I'll take a peek. I'm not sure why it would fail. Can you give more details on how you tested this? (The weird
schemaPath
value isn't fromsway
butz-schema
and it shouldn't mislead you.) Can you give the full parameter definition and the requested path made? Or maybe even a simple reproduction snippet of code?
Since I have debug it, below code goes wrong , that caused the validator consider the parameter missed https://github.com/apigee-127/sway/blob/e9ad6e81af41f526567e9d5a0f150e59e429e513/lib/types/path.js#L95
I think it caused by the path-to-regexp , per https://github.com/pillarjs/path-to-regexp, parameter names must use "word characters" ([A-Za-z0-9_]).
I create a swagger with path templating , and one parameter name is 'key-name' e.g.
Since I refer to the swagger specification document , but I did not find any information about the parameter name could not include special character like '-'