This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 400,000 packages pre-installed, including
azure-openapi-linter with all
npm packages installed. Try it out:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
The first step would be to run
npm install so we have all the required modules installed.
This runs the tests under tests directory.
azure-openapi-linterdirectory named same as the name of the rule. Add the
appliesTo_JsonQueryproperties to the rule.
appliesTo_JsonQueryis the node(s) to which the rule needs to be applied. This is evaluated using JsonPaths. Please refer here for a brief tutorial about JsonPaths.
runmethod under the rule that actually does the validation. Add a reference to this script file under
src\azure-openapi-linter\tests\resourcesand a script under
src\azure-openapi-linter\testsdepending on the type of the validation rule.