Skip to content

Latest commit

 

History

History
84 lines (55 loc) · 3.83 KB

CONTRIB_EXTENSION.md

File metadata and controls

84 lines (55 loc) · 3.83 KB

Contribute an Data Model Extension

To contribute a Data Model Extension, please follow these steps:

NOTE: The following steps presuppose that you have already forked and cloned the pact-catalog repository. If that is not the case, please go back to the main instructions and follow them in order.

1. Create a new extension path in the data-model-extensions directory

From the parent directory of your local repository run

Please note: All text between angle brackets (< >) should be replaced by actual values. Please make sure that the values replacing <your-user-id>, <extension-id> only include lowercase letters and dashes (instead of whitespace). The value replacing <extension-version> should follow the X.Y.Z format. Please make sure that these remain consistent. The value replacing <MIT | CC0> should be either "MIT" or "CC0"

mkdir -p catalog/data-model-extensions/@<your-user-id>/<extension-id>/<extension-version>

E.g., mkdir -p catalog/data-model-extensions/@abc-institute/example-extension/0.0.0

2. Populate your extension's directory with the necessary files

From the parent directory of your local repository run

cd catalog/data-model-extensions/@<your-user-id>/<extension-id>/<extension-version>
touch LICENSE && touch extension.json && touch schema.json && touch README.md

E.g., cd catalog/data-model-extensions/abc-institute/example-extension/0.0.0 touch LICENSE && touch extension.json && touch schema.json && touch README.md

The README.md file is optional, but highly recommended. It should be filled with information about the extension and instructions on how to use it.

3. Fill in your extension's details

3.1 extension.json

Open the extension.json file created in step 4. and fill it adapting the following structure:

{
  "id": {
    "namespace": "@<your-user-id>", // e.g. 'ABC Institute' has user id "abc-institute" or "abc"
    "extension_name": "<extension-id>", // e.g. "example-extension"
    "version": "<extension-version>" // e.g. "0.0.0"
  },
  "name": "<Name of the extension>", // e.g. "Example Extension"
  "files": ["schema.json"],
  "author": {
    "name": "<Institution's name>", // e.g. "ABC Institute"
    "email": "<email>",
    "url": "<website>"
  },
  "license": "<MIT | CC0>", // select one
  "catalog_info": {
    "summary": "<Summary of the Extension>",
    "status": "draft",
    "authors": ["<your-user-id>"] // same as the one used in the `"namespace"` field (without '@')
  },
  "industries": ["<industry>"]
}

Please refer to this example to see how your extension.json should look like.

3.2 schema.json

Open the schema.json file created in step 4. and fill it with your extension. This must be a valid JSON schema based on the Pathfinder Technical Specification V2

3.3 LICENSE

Open the LICENSE file created in step 4. and fill it according to your license choice, which must be either MIT or CC0.

You can use this template for the MIT license and copy this text for the CC0 license.

4. Commit your branch, push it, and open a Pull Request

Please continue from step 6 of the main instructions.

Your Pull Request will be reviewed and added to the PACT Online Catalog as soon as possible.

NOTE: By submitting an Data Model Extension you acknowledge that you have read and accepted the Terms and Conditions