Add unit tests and implementations for MongoDB index models and OpenAPI metadata
- Implemented `MongoIndexModelTests` to verify index models for various stores. - Created `OpenApiMetadataFactory` with methods to generate OpenAPI metadata. - Added tests for `OpenApiMetadataFactory` to ensure expected defaults and URL overrides. - Introduced `ObserverSurfaceSecrets` and `WebhookSurfaceSecrets` for managing secrets. - Developed `RuntimeSurfaceFsClient` and `WebhookSurfaceFsClient` for manifest retrieval. - Added dependency injection tests for `SurfaceEnvironmentRegistration` in both Observer and Webhook contexts. - Implemented tests for secret resolution in `ObserverSurfaceSecretsTests` and `WebhookSurfaceSecretsTests`. - Created `EnsureLinkNotMergeCollectionsMigrationTests` to validate MongoDB migration logic. - Added project files for MongoDB tests and NuGet package mirroring.
This commit is contained in:
15
src/Notifier/StellaOps.Notifier/docs/NOTIFY-OAS-61-ETAG.md
Normal file
15
src/Notifier/StellaOps.Notifier/docs/NOTIFY-OAS-61-ETAG.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# Notifier OAS Discovery — ETag Guidance
|
||||
|
||||
The Notifier WebService exposes its OpenAPI document at `/.well-known/openapi` with headers:
|
||||
|
||||
- `X-OpenAPI-Scope: notify`
|
||||
- `ETag: "<sha256>"` (stable per spec bytes)
|
||||
- `Cache-Control: public, max-age=300`
|
||||
|
||||
Usage notes:
|
||||
|
||||
- SDK generators and CI smoke tests should re-use the `ETag` for conditional GETs (`If-None-Match`) to avoid redundant downloads.
|
||||
- Mirror/Offline bundles should copy `openapi/notify-openapi.yaml` and retain the `ETag` alongside the file hash used in air-gap validation.
|
||||
- When the spec changes, the SHA-256 and `ETag` change together; callers can detect breaking/non-breaking updates via the published changelog (source of truth in `docs/api/notify-openapi.yaml`).
|
||||
|
||||
Applies to tasks: NOTIFY-OAS-61-001/61-002/63-001.
|
||||
Reference in New Issue
Block a user