Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dvsa/mes-api-definitions
DVSA Mobile Examiner Services - REST API schema definitions
https://github.com/dvsa/mes-api-definitions
Last synced: 13 days ago
JSON representation
DVSA Mobile Examiner Services - REST API schema definitions
- Host: GitHub
- URL: https://github.com/dvsa/mes-api-definitions
- Owner: dvsa
- License: mit
- Created: 2018-12-12T21:49:11.000Z (about 6 years ago)
- Default Branch: develop
- Last Pushed: 2024-10-02T13:24:28.000Z (3 months ago)
- Last Synced: 2024-12-05T02:33:42.575Z (24 days ago)
- Language: HTML
- Size: 1.82 MB
- Stars: 1
- Watchers: 11
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://combinatronics.com/dvsa/mes-api-definitions/develop/redoc-static.html).# 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 mes-test-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. Navigate into the relevent schema (ie. mes-test-schema)
2. Make edits to the relevant json schema file
3. Generate the new TypeScript definitions using `npm run generate` - _Ensure you are in the correct directory_
4. If necessary, update the `index.d.ts`
5. Bump the version of the package using `npm version {major|minor|patch}` - _Ensure you are in the correct directory_
6. Raise a Pull Request on Github and await approvals
7. After merging into `develop`, we can now use GitHub actions to publish a given package for us - this can be found via the `Actions` tab, then click the workflow on the left i.e. `Publish package` - You will then be presented with a `Run worfklow` option in which you can specify which of the schemas to publish.# Updating mes-config-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. Navigate into "mes-config-schema" directory
2. Make edits to the relevant json schema file
3. Generate the new TypeScript definitions using `npm run generate-remote-config` - _Ensure you are in the "mes-config-schema" directory_
4. Bump the version of the package using `npm version {major|minor|patch}` - _e.g "npm version minor" to move from 1.1.1 to 1.2.0_
5. Raise a Pull Request on Github and await approvals
6. After merging into `develop`, we can now use GitHub actions to publish a given package for us - this can be found via the `Actions` tab, then click the workflow on the left i.e. `Publish package` - You will then be presented with a `Run worfklow` option in which you can specify which of the schemas to publish.