Skip to content

Commit

Permalink
feat: Allow $schema key in manifest config schema (googleapis#1584)
Browse files Browse the repository at this point in the history
* feat: Allow $schema key in manifest config schema

* add ajv-formats for schema validation

Co-authored-by: Jeff Ching <[email protected]>
  • Loading branch information
luxaritas and chingor13 authored Aug 18, 2022
1 parent 92e1366 commit d0d43a0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"@types/xmldom": "^0.1.31",
"@types/yargs": "^17.0.0",
"ajv": "^8.11.0",
"ajv-formats": "^2.1.1",
"c8": "^7.0.0",
"chai": "^4.2.0",
"cross-env": "^7.0.0",
Expand Down
5 changes: 5 additions & 0 deletions schemas/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@
},
{
"properties": {
"$schema": {
"description": "Path to the release-please manifest config schema",
"type": "string",
"format": "uri"
},
"packages": {
"description": "Per-path component configuration.",
"type": "object",
Expand Down
2 changes: 2 additions & 0 deletions test/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@
import {describe, it} from 'mocha';
import {expect} from 'chai';
import Ajv from 'ajv';
import addFormats from 'ajv-formats';
import {readdirSync} from 'fs';
import {resolve} from 'path';
import {configSchema, manifestSchema} from '../src/index';

const fixturesPath = './test/fixtures/manifest';
const ajv = new Ajv();
addFormats(ajv);

describe('schemas', () => {
describe('manifest file', () => {
Expand Down

0 comments on commit d0d43a0

Please sign in to comment.