nhs-notify-standards

NHS Notify Metadata

Notify Metadata

$idnhs-notify-metadata.schema.json
$schemahttps://json-schema.org/draft/2020-12/schema

Properties

NameType
teamResponsibleString
notifyDomainString
microserviceString
versionString

Example

{
    "teamResponsible": "Team 1",
    "notifyDomain": "Ordering",
    "microservice": "order-service",
    "version": "1.3.0"
}

Example

{
    "teamResponsible": "Team 2",
    "notifyDomain": "Reporting",
    "microservice": "reporting-api",
    "version": "2.0.0"
}

teamResponsible

Description Owning engineering team accountable for this event's domain logic.
TypeString
Required Yes
Enum
  • Team 1
  • Team 2
  • Team 3
Examples
  • Team 1
  • notifyDomain

    Description High-level business domain to which the event belongs.
    TypeString
    Required Yes
    Enum
    • Ordering
    • Delivering
    • Reporting
    • Enquiries
    Examples
  • Ordering
  • microservice

    Description The name of the microservice generating the event, e.g. order-service
    TypeString
    Required No
    Min Length 1
    Max Length 100
    Pattern ^[a-zA-Z0-9-]+$
    Examples
  • order-service
  • version

    Description Semantic version (SemVer 2.0.0) of the producing microservice at emit time.
    TypeString
    Required Yes
    Pattern ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
    Examples
  • 1.3.0
  • 2.0.0-beta.1

  • Schema

    {
        "$id": "nhs-notify-metadata.schema.json",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "title": "NHS Notify Metadata",
        "type": "object",
        "description": "Notify Metadata",
        "additionalProperties": false,
        "required": [
            "version",
            "teamResponsible",
            "notifyDomain"
        ],
        "properties": {
            "teamResponsible": {
                "type": "string",
                "enum": [
                    "Team 1",
                    "Team 2",
                    "Team 3"
                ],
                "description": "Owning engineering team accountable for this event's domain logic.",
                "examples": [
                    "Team 1"
                ]
            },
            "notifyDomain": {
                "type": "string",
                "enum": [
                    "Ordering",
                    "Delivering",
                    "Reporting",
                    "Enquiries"
                ],
                "description": "High-level business domain to which the event belongs.",
                "examples": [
                    "Ordering"
                ]
            },
            "microservice": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[a-zA-Z0-9-]+$",
                "description": "The name of the microservice generating the event, e.g. order-service",
                "examples": [
                    "order-service"
                ]
            },
            "version": {
                "type": "string",
                "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
                "description": "Semantic version (SemVer 2.0.0) of the producing microservice at emit time.",
                "examples": [
                    "1.3.0",
                    "2.0.0-beta.1"
                ]
            }
        },
        "examples": [
            {
                "teamResponsible": "Team 1",
                "notifyDomain": "Ordering",
                "microservice": "order-service",
                "version": "1.3.0"
            },
            {
                "teamResponsible": "Team 2",
                "notifyDomain": "Reporting",
                "microservice": "reporting-api",
                "version": "2.0.0"
            }
        ]
    }