mirror of
https://github.com/appium/appium.git
synced 2026-10-23 17:19:04 +08:00
8b7906f757
- appium@2.0.0-beta.31 - @appium/base-driver@8.5.0 - @appium/base-plugin@1.8.2 - @appium/doctor@1.16.15 - @appium/docutils@0.0.1 - @appium/execute-driver-plugin@1.0.2 - @appium/fake-driver@3.2.10 - @appium/fake-plugin@1.2.1 - @appium/gulp-plugins@6.0.6 - @appium/images-plugin@1.1.7 - @appium/opencv@1.0.5 - @appium/relaxed-caps-plugin@1.0.0-beta.3 - @appium/schema@0.0.3 - @appium/support@2.57.2 - @appium/test-support@1.3.16 - @appium/types@0.2.0 - @appium/universal-xml-plugin@1.0.0-beta.5
@appium/schema
JSON schema for Appium configuration files
Description
This package is used internally by Appium, but can also be used to validate Appium configuration files in other contexts.
Install
npm i @appium/schema
Usage
The schema is exported as a JS object:
const { AppiumConfigJsonSchema } = require('@appium/schema');
It is also provided as a JSON file (since this is a JSON schema, after all):
const schema = require('@appium/schema/lib/appium-config.schema.json');
See Also
@appium/types exports a TypeScript type AppiumConfig (generated from this package) for typesafe configuration objects; this may be useful if your Appium configuration is written in JS (e.g., .appiumrc.js). Example:
// @ts-check
/** @type {import('@appium/types').AppiumConfig} */
module.exports = {
server: {
port: 1234,
host: '127.0.0.1'
}
}
Notes
lib/appium-config.schema.json is generated by this package from lib/appium-config-schema.js (the single source of truth), but is under version control to avoid chicken-or-egg build problems.
License
Apache-2.0