How to create Building Blocks
starting point options:
- Create from scratch using a template - see below
- Fork an existing repository to update or add new building blocks, and generate a Pull Request to submit to the register owner
- Copy any building block repository and edit
bblocks-config.yaml
and the_sources/*
to create a new register
In all cases follow the local build process to test before committing to an online repository.
Quick how-to create
- Navigate to the bblock-template repository.
- Click on “Use this template” on GitHub (do not fork this repository, or you will have to manually enable the workflows).
- Set the
identifier-prefix
provided by OGC inbblocks-config.yaml
:- The first component of the prefix should represent the entity defining or maintaining this building block
collection. If this is an OGC-related project, you may use
ogc.
here. - The rest of the prefix components should be chosen according to the nature of the collection. For example, if
this repository only contained schemas for OGC API X version 1.x,
a possible prefix could be
ogc.apis.api-x.v1.schemas.
. - Bear in mind that the path of the building blocks inside
_sources
will be used in their identifiers (see below). - Identifiers should be as stable as possible, even when under development. This makes it easier to promote building blocks to production (i.e., being adopted by the OGC as official), and avoids having to manually/update references (in dependency declarations, schemas, etc.).
- The first component of the prefix should represent the entity defining or maintaining this building block
collection. If this is an OGC-related project, you may use
- Set a
name
for the repository insidebblocks-config.yaml
. - Configure any necessary imports inside
bblocks-config.yaml
. - Set the additional register metadata properties in
bblocks-config.yaml
. - For each new building block, replace or create a copy of the
mySchema
ormyFeature
inside_sources
. Note: the path to and name of the new directory will be part of the building block identifier. - Update the building block’s files.
- Add documentation to your Building Block.
- See defining a schema for information how test an existing schema.
- See adding JSON-LD context for information how to “uplift” a schema - linking to a model using JSON-LD.
- See validation for information how to define powerful constraints for schemas and semantic models.
- See transforms for information how to define and test transformations.
- Replace the README.md file with documentation about the new building block(s).
- Enable GitHub pages in the repository settings, setting “Source” (under “Build and deployment”) to “GitHub Actions”.
Additional register metadata properties
The following additional properties can be set inside bblocks-config.yml
:
name
: A (short) string with the name of the register.abstract
: A short text to serve as an introduction to the register or building blocks collection. Markdown can be used here.description
: A longer text with a description of the register or collection. Markdown can be used here.