mes-api-definitions

0.0.5 • Public • Published

mes-api-definitions

These are the REST API definitions (OpenAPI and JSON Schema) for the Mobile Examiner Services project, for our backend microservices to implement, and our frontend mobile app to consume.

API Docs

See OpenAPI Definition.

Usage

Example category B schema usage:
import { StandardCarTestCATBSchema } from '@dvsa/mes-test-schema/categories/B';

Generating schemas for mes-test-schema

To clean current schemas, run the command: npm run clean

To generate new schemas, (Combining the partials and common schema), run the command: npm run generate

NOTE: The category specific index.d.ts files were initially generated but have been modified by hand to create the category specific namespaces. These files should not be deleted nor regenerated but any new types should be added manually.

Updating a schema

Always make your edits to the json schema files (except for the category index.json files, these are auto-generated) and not the generated TypeScript definition files (ending in .d.ts). The general process for updating a schema is:-

  1. Make edits to the relevant json schema file
  2. Generate the new TypeScript definitions using npm run generate - Ensure you are in the correct directory
  3. If necessary, update the index.d.ts
  4. Bump the version of the package using npm version {major|minor|patch} - Ensure you are in the correct directory
  5. Raise a Pull Request on Github and await approvals
  6. Publish the new package to npm using npm publish - You must be logged in and have the correct permissions to publish to the @dvsa npm org

Readme

Keywords

none

Package Sidebar

Install

npm i mes-api-definitions

Weekly Downloads

2

Version

0.0.5

License

MIT

Unpacked Size

1.43 MB

Total Files

44

Last publish

Collaborators

  • szabikr