Lines Matching refs:schema
2 This script updates the necessary schema for the passed-in version.
4 yarn run schema-sync 38 -> updates the schema that versions/v38.0.0/sdk/app-config.md uses
5 yarn run schema-sync unversioned -> updates the schema that versions/unversioned/sdk/app-config.md …
8 const parser = require('@apidevtools/json-schema-ref-parser');
18 console.log('E.g., "yarn run schema-sync 38" \nor, "yarn run schema-sync unversioned"');
24 `http://exp.host/--/api/v2/project/configuration/schema/UNVERSIONED`
26 const schema = await preprocessSchema(response.data.data.schema);
29 `public/static/schemas/unversioned/app-config-schema.json`,
30 JSON.stringify(schema.properties),
35 console.log(`Fetching schema for ${version} from production...`);
38 console.log(`Unable to fetch schema for ${version} from production, trying staging...`);
45 const schemaPath = `public/static/schemas/v${version}.0.0/app-config-schema.json`;
51 `http://${hostname}/--/api/v2/project/configuration/schema/${version}.0.0`
53 const schema = await preprocessSchema(response.data.data.schema);
55 await fs.writeFile(schemaPath, JSON.stringify(schema.properties), 'utf8');
58 async function preprocessSchema(schema) {
60 return await parser.dereference(schema);