feat: Add in-memory implementations for issuer audit, key, repository, and trust management
Some checks failed
devportal-offline / build-offline (push) Has been cancelled
Mirror Thin Bundle Sign & Verify / mirror-sign (push) Has been cancelled
Docs CI / lint-and-preview (push) Has been cancelled
api-governance / spectral-lint (push) Has been cancelled
oas-ci / oas-validate (push) Has been cancelled
Some checks failed
devportal-offline / build-offline (push) Has been cancelled
Mirror Thin Bundle Sign & Verify / mirror-sign (push) Has been cancelled
Docs CI / lint-and-preview (push) Has been cancelled
api-governance / spectral-lint (push) Has been cancelled
oas-ci / oas-validate (push) Has been cancelled
- Introduced InMemoryIssuerAuditSink to retain audit entries for testing. - Implemented InMemoryIssuerKeyRepository for deterministic key storage. - Created InMemoryIssuerRepository to manage issuer records in memory. - Added InMemoryIssuerTrustRepository for managing issuer trust overrides. - Each repository utilizes concurrent collections for thread-safe operations. - Enhanced deprecation tracking with a comprehensive YAML schema for API governance.
This commit is contained in:
@@ -165,3 +165,69 @@ rules:
|
||||
in:
|
||||
const: header
|
||||
required: [name, in]
|
||||
|
||||
# --- Deprecation Metadata Rules (per APIGOV-63-001) ---
|
||||
|
||||
stella-deprecated-has-metadata:
|
||||
description: "Deprecated operations must have x-deprecation extension with required fields"
|
||||
message: "Add x-deprecation metadata (deprecatedAt, sunsetAt, successorPath, reason) to deprecated operations"
|
||||
given: "$.paths[*][*][?(@.deprecated == true)]"
|
||||
severity: error
|
||||
then:
|
||||
field: x-deprecation
|
||||
function: schema
|
||||
functionOptions:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- deprecatedAt
|
||||
- sunsetAt
|
||||
- successorPath
|
||||
- reason
|
||||
properties:
|
||||
deprecatedAt:
|
||||
type: string
|
||||
format: date-time
|
||||
sunsetAt:
|
||||
type: string
|
||||
format: date-time
|
||||
successorPath:
|
||||
type: string
|
||||
successorOperationId:
|
||||
type: string
|
||||
reason:
|
||||
type: string
|
||||
migrationGuide:
|
||||
type: string
|
||||
format: uri
|
||||
notificationChannels:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
enum: [slack, teams, email, webhook]
|
||||
|
||||
stella-deprecated-sunset-future:
|
||||
description: "Sunset dates should be in the future (warn if sunset already passed)"
|
||||
message: "x-deprecation.sunsetAt should be a future date"
|
||||
given: "$.paths[*][*].x-deprecation.sunsetAt"
|
||||
severity: warn
|
||||
then:
|
||||
function: truthy
|
||||
|
||||
stella-deprecated-migration-guide:
|
||||
description: "Deprecated operations should include a migration guide URL"
|
||||
message: "Consider adding x-deprecation.migrationGuide for consumer guidance"
|
||||
given: "$.paths[*][*][?(@.deprecated == true)].x-deprecation"
|
||||
severity: hint
|
||||
then:
|
||||
field: migrationGuide
|
||||
function: truthy
|
||||
|
||||
stella-deprecated-notification-channels:
|
||||
description: "Deprecated operations should specify notification channels"
|
||||
message: "Add x-deprecation.notificationChannels to enable deprecation notifications"
|
||||
given: "$.paths[*][*][?(@.deprecated == true)].x-deprecation"
|
||||
severity: hint
|
||||
then:
|
||||
field: notificationChannels
|
||||
function: truthy
|
||||
|
||||
Reference in New Issue
Block a user