Skip to main content

Examples

This page only references example files that currently exist in the uigraph-cli repository.

Repository example files

Full config example

  • examples/configs/.uigraph.yaml
  • examples/configs/.uigraph/openapi/storefront-sample.yaml
  • examples/configs/.uigraph/diagrams/login-flow/*
  • examples/configs/.uigraph/diagrams/system-overview/*
  • examples/configs/.uigraph/db/*

CI/CD examples

  • examples/ci-cd/github-actions.yml
  • examples/ci-cd/github-actions-advanced.yml
  • examples/ci-cd/gitlab-ci.yml

API specification examples

  • examples/specs/openapi/booking-service.yaml
  • examples/specs/openapi/payment-api.yaml
  • examples/specs/openapi/web-app-api.yaml
  • examples/specs/openapi/mobile-api.yaml
  • examples/specs/graphql/schema.graphql
  • examples/specs/grpc/analytics.proto

1) Minimal service

version: 1

project:
name: mobile-platform

service:
name: Mobile API
category: Mobile
description: Backend API for mobile applications
repository:
provider: bitbucket
url: https://bitbucket.org/company/mobile-api

2) Service with APIs

version: 1

project:
name: analytics-platform
environment: production

service:
name: Analytics Service
category: Data
description: Real-time analytics processing and aggregation
repository:
provider: gitlab
url: https://gitlab.com/company/analytics-service

apis:
- name: analytics-graphql
type: graphql
path: ./specs/schema.graphql
- name: analytics-grpc
type: grpc
path: ./specs/analytics.proto

3) Service with Mermaid context

architectureDiagrams:
- name: Checkout Context Diagram
path: ./diagram-checkout.mmd
contextPath: ./context-checkout.json

4) Service with test packs

testPacks:
- name: checkout-regression
type: regression
testCases:
- type: api
title: apply-coupon returns 200
order: 1
apiGroupName: checkout-api
operationId: applyCoupon
expectedStatusCode: 200
requestTemplate: '{"code":"SAVE20"}'
isCritical: false

5) Service with multiple databases

databases:
- name: Core PostgreSQL Database
dbType: PostgreSQL
dialect: postgres
schemaPath: ./postgresql-core.sql

- name: Event MongoDB Database
dbType: MongoDB
dialect: mongodb
schemaPath: ./mongodb-events.json

6) Combined all-options example

version: 1

project:
name: one-service-all-options-project
environment: production

service:
name: One Service All Options
category: Backend
description: Single fixture combining APIs, diagrams, tests, and databases.
repository:
provider: github
url: https://github.com/example/one-service-all-options.git

apis:
- name: public-api
type: openapi
path: ./openapi-public.yaml

architectureDiagrams:
- name: Shape Context Diagram
path: ./diagram-shape.mmd
contextPath: ./context-shape.json

testPacks:
- name: smoke-pack
type: smoke
testCases:
- type: manual
title: smoke checkout path
order: 1
stepsList:
- action: Complete checkout with valid inputs
expectedResult: Checkout succeeds
expectedOutcome: Order is confirmed
requiresEvidence: true
isCritical: true

databases:
- name: Core MySQL Database
dbType: MySQL
dialect: mysql
schemaPath: ./mysql-core.sql

Tips

  • Start from examples/configs/.uigraph.yaml if you want one realistic end-to-end sample.
  • Add OpenAPI operationId values when your test cases need to target specific endpoints.
  • Keep example file paths repository-relative so dry-run and CI behave the same way.