Tip: The MSAdoc format is available as JSON Schema. In editors like VSCode, simply add the following line to your
.msadoc.json
files to enable IntelliSense and validation:
{
"$schema": "https://raw.githubusercontent.com/riehlegroup/msadoc/main/schemas/service-doc.json"
}
The name of the microservice. The name
is used as key to identify and reference services.
{
"name": "PipelineService"
}
- Use a consistent naming scheme across all microservices.
- Don't use spaces to avoid ambiguities.
The group of the microservice. Supports multiple hierarchies separated by a dot, e.g. group.sub-group.sub-sub-group
.
The group
name will later be used as key to add more meta-data to the group.
{
"name": "PipelineService",
"group": "etl.pipeline"
}
- Use a consistent naming scheme across all groups.
- Don't use spaces to avoid ambiguities.
A list of tags for the microservice. The tag
is used as key to filter services.
{
"name": "PipelineService",
"tags": ["pipeline", "backend"]
}
- Use a consistent tagging scheme across all microservices.
- Don't use spaces to avoid ambiguities.
The link to the microservice's repository.
{
"name": "PipelineService",
"repository": "https://github.com/jvalue/ods"
}
- If you use a mono-repo approach you might want to link to the directory of the microservice instead.
The link to the microservice's task board.
{
"name": "PipelineService",
"taskBoard": "https://github.com/jvalue/ods/projects/1"
}
- If you utilize a microservice-overarching task board you might want to link to a filtered view specific to the microservice.
The APIs that the microservice provides. The consumedAPI
identifier of other microservices have to match with the here chosen providerAPI
in order to link them. A microservice can provide multiple APIs allowing to document more fine-granularly.
The chosen formatting as string is deliberatively chosen to allow documenting multiple communication protocols.
{
"name": "PipelineService",
"providedAPIs": ["/pipelines", "/pipeline-executions"]
}
- Use this attribute to document synchronous API dependencies. For events use the attribute
publishedEvents
. - Use a consistent naming scheme for APIs across all microservices.
- Consider if you can uniquely identify an API via its route, e.g.
/pipelines
to add more expressiveness to the documentation. Otherwise you can use custom names as e.g.PipelineApi
. - Don't use spaces to avoid ambiguities.
The APIs that the microservice consumes. The consumedAPI
identifier has to match a providerAPI
identifier in another microservice's msadoc.json
in order to link them.
{
"name": "PipelineService",
"consumedAPIs": ["/datasources"]
}
- Use this attribute to document synchronous API dependencies. For events use the attribute
subscribedEvents
.
The events that the microservice publishes. The subscribedEvents
identifier of other microservices have to match with the here chosen publishedEvents
in order to link them. A microservice can provide multiple events allowing to document more fine-grained.
The chosen formatting as string is deliberatively chosen to allow documenting multiple communication protocols.
{
"name": "PipelineService",
"publishedEvents": [
"datasources.config.created",
"datasources.config.deleted",
"datasources.execution.success",
"datasources.execution.failure"
]
}
- Use this attribute to document asynchronous event dependencies. For synchronous APIs like HTTP or RPC use the attribute
providedAPIs
. - Use a consistent naming scheme for events across all microservices.
- Consider if you can uniquely identify an event via its routing key, e.g.
datasources.config.created
to add more expressiveness to the documentation. Otherwise you can use custom names as e.g.DatasourceConfigCreatedEvent
. - Don't use spaces to avoid ambiguities.
The events that the microservice consumes. The subscribedEvents
identifier has to match a publishedEvents
identifier in another microservice's msadoc.json
in order to link them.
{
"name": "PipelineService",
"subscribedEvents": ["datasources.execution.success"]
}
- Use this attribute to document asynchronous event dependencies. For synchronous APIs like HTTP or RPC use the attribute
consumedAPIs
.
The link to the development documentation.
{
"name": "PipelineService",
"developmentDocumentation": "https://github.com/jvalue/ods/blob/main/pipeline/README.md"
}
- Maintain a markdown file in your microservice repository that you can link here.
The link to the deployment documentation.
{
"name": "PipelineService",
"deploymentDocumentation": "https://github.com/jvalue/ods"
}
- Maintain a markdown file in your microservice repository or in the deployment repository that you can link here.
The link to the API documentation.
{
"name": "PipelineService",
"apiDocumentation": "https://github.com/jvalue/ods/tree/main/pipeline#api"
}
- Maintain a markdown file in your microservice repository or you can link here.
- Alternatively, use a documentation tool as OpenAPI or AsyncAPI to document your APIs and link to the running instance here.
The identifier of the responsible team. Make sure all microservices governed by the same team use the same identifier in order to link them.
{
"name": "PipelineService",
"responsibleTeam": "PipelineTeam"
}
- If you have shared responsibilities for certain microservices, you might consider introducing a
SharedOwnership
team.
The email addresses or names of the mainly responsible people that should serve as contact persons. Make sure all microservices governed by the same responsible use the same identifier in order to link them.
{
"name": "PipelineService",
"responsibles": ["[email protected]", "[email protected]"]
}
- Using email addresses makes getting in touch easier than names.
You can easily add custom fields under the attribute extensions
.
Extension field values can only be of type string
, number
, boolean
, or array
of these types.
Extension fields are visualized in the UI in a very generic way.
{
"name": "PipelineService",
"extensions": {
"usedInProducts": ["ProductA", "ProductB"]
}
}
- Use extension fields to document things the base version does not support (as an alternative to tags).