qaskx.template/generator/default/sequence/sd01.md.tmpl

53 lines
1.4 KiB
Cheetah

# Sequence diagram
This represents the sequence diagram for
service **{{.ServiceName}}**
```mermaid
sequenceDiagram
participant consumer as Consumer
participant gateway as Gateway
participant microservice as {{.ServiceName}}
participant feature as Svc Feature
participant authz as Authorisation
participant log as Logger
{{ range .Apis}}participant {{ .Name }} as Svc{{ .Name }}
{{ end }}
consumer->>+gateway: {{.ServicePoint}}
activate consumer
note right of gateway: Authentication check at GW
gateway->>+microservice: {{.ServicePoint}}
microservice->>+authz: Validate requestor
note right of authz: Authorise to function
authz-->>-microservice: 200 or 401/403 status
microservice->>+feature: Check feature switch
feature-->>-microservice: 200 or 401/403 status
microservice-)log: log request/response
{{ range .Apis}}
microservice-->>+{{ .Name }}: link {{ .Url }}
note right of {{ .Name }}: Explanation of what happens
{{ .Name }}-->>-microservice: 200 OK response
{{ end }}
alt 200 OK
microservice-->>gateway: 200 OK response
gateway-->>consumer: 200 OK response
else not OK, error
microservice-->>-gateway: !200 ERR response
gateway-->>-consumer: !200 ERR response
end
deactivate consumer
```
***Note***: Adjust the default sequence diagram above
Copyright {{.QaskxDot.ServiceOwner}}
Contact {{.QaskxDot.ServiceOwnerEmail}}