66db560ca5
Custom keywords were required to be valid JS identifiers due to the way they were being used in the generated code. This prevented the use of keywords with the `x-` prefix that is required by [swagger](http://swagger.io]. This change fixes that by updating the only place that was using them directly as an identifier to use //brackets// notation rather than //dot// notation. This brings the definition of `$schemaPath` in `definitions.def` in line with the way the rule definition is accessed from `RULES.custom` at the top of `custom.jst`. The validation of the keyword name has been changed to allow any name in this change, but this should be updated to either just remove the test or update it to a new rule before this change is included in the project. Finally, this also updates a number of the tests in `custom.spec.js` to use non-valid identifiers for the names of some of the custom keywords being tested (primarily by adding `x-` to the front of the name). Test Plan: - Run `npm test` and ensure all tests run and pass |
||
---|---|---|
.. | ||
index.js | ||
range.jst | ||
range_with_errors.jst |