Files
git.stella-ops.org/etc/microservice.yaml.sample
StellaOps Bot 6a299d231f
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
Policy Lint & Smoke / policy-lint (push) Has been cancelled
Add unit tests for Router configuration and transport layers
- Implemented tests for RouterConfig, RoutingOptions, StaticInstanceConfig, and RouterConfigOptions to ensure default values are set correctly.
- Added tests for RouterConfigProvider to validate configurations and ensure defaults are returned when no file is specified.
- Created tests for ConfigValidationResult to check success and error scenarios.
- Developed tests for ServiceCollectionExtensions to verify service registration for RouterConfig.
- Introduced UdpTransportTests to validate serialization, connection, request-response, and error handling in UDP transport.
- Added scripts for signing authority gaps and hashing DevPortal SDK snippets.
2025-12-05 08:01:47 +02:00

62 lines
2.1 KiB
Plaintext

# Sample Stella Microservice Configuration
# This file defines optional endpoint overrides for microservices.
# YAML overrides can only modify endpoints already defined in code;
# they cannot create new endpoints.
#
# Place this file next to your microservice executable and configure
# the ConfigFilePath option in AddStellaMicroservice():
#
# services.AddStellaMicroservice(options =>
# {
# options.ServiceName = "my-service";
# options.Version = "1.0.0";
# options.Region = "us-east";
# options.ConfigFilePath = "microservice.yaml";
# });
# Endpoint overrides
# Each entry must match an existing endpoint by method + path.
# Only the properties you specify will be overridden.
endpoints:
# Override timeout for a long-running operation
- method: POST
path: /api/reports/generate
defaultTimeout: 5m # Supports: "30s", "5m", "1h", or "00:00:30" format
# Enable streaming for a large data endpoint
- method: GET
path: /api/data/stream
supportsStreaming: true
# Add authorization requirements
- method: DELETE
path: /api/admin/users/{id}
requiringClaims:
- type: role
value: admin
- type: permission
value: user:delete
# Full override example with all supported properties
- method: POST
path: /api/batch/process
defaultTimeout: 30m
supportsStreaming: true
requiringClaims:
- type: role
value: operator
- type: scope
value: batch:write
# Notes:
# - method: HTTP method (GET, POST, PUT, DELETE, PATCH, etc.)
# - path: Route template (must match code exactly, including parameters)
# - defaultTimeout: Optional. Overrides the endpoint's default timeout.
# Formats: "30s" (seconds), "5m" (minutes), "1h" (hours), or TimeSpan "00:05:00"
# - supportsStreaming: Optional. Whether the endpoint supports streaming responses.
# - requiringClaims: Optional. Claims required to access the endpoint.
# Each claim has 'type' (required) and 'value' (optional for presence-only checks).
#
# If a YAML override doesn't match any code endpoint, a warning is logged.
# This helps catch typos in method/path combinations.