git clone [email protected]:mpapp-public/manuscripts-json-schema.git
npm i
npm t
cp schemas_src/concrete/MPSection.json schemas_src/concrete/MPProject.json
- Edit the newly created
MPProject.json
file
The schema we copied MPSection
is probably the best example of the different
things that can be done.
Within in the JSON Schema, you only want to edit things in the with
property.
The properties
key within with
(i.e. .with.properties
) is where the
possible properties are listed.
The required
key within with
(i.e. .with.required
) is where you can list
keys defined in properties
as required.
npm t
(unlikely to have broken anything though)npm run build
You can now look at schemas/MPProject.json
to see the recursively
merged/compiled schema.
You can also look at dist/types.ts
to see the TypeScript defintion that was
generated.
Ideally make a merge request.
Alternatively, if you have npm
access to the @manuscripts
organisation:
npm version patch
npm publish --access public
Please be careful with this and always make sure master
has your changes.
After this package has been updated, @manuscripts/manuscripts-sync
will need
to be updated with this reference.
- Edit
package.json
of@manuscripts/manuscripts-sync
with new version number of@manuscripts/manuscripts-json-schema
npm i && npm t
git commit
npm version patch
npm publish --access public
After @manuscripts/manuscripts-sync
has been updated, manuscripts-api
will
need to be updated in the exact same way.