Skip to content

Comments

docs: adjustment to API docs and alternative patterns added#6

Open
ihorman wants to merge 4 commits intocyberfabric:mainfrom
ihorman:api
Open

docs: adjustment to API docs and alternative patterns added#6
ihorman wants to merge 4 commits intocyberfabric:mainfrom
ihorman:api

Conversation

@ihorman
Copy link
Contributor

@ihorman ihorman commented Oct 29, 2025

Restructure API documentation and add alternative patterns


Description

Restructured documentation to separate REST from alternative API patterns and enhanced existing sections with comprehensive details:

Restructuring:

  • Moved GraphQL, gRPC, and AsyncAPI out of REST/API.md into separate directories
  • Created GraphQL/, gRPC/, and AsyncAPI/ directories with dedicated API.md files
  • Updated README.md with clear navigation structure

REST Enhancements (additive only, no deletions):

  • Authentication & Authorization: Added OAuth2 flows, API key rotation, JWT claims, mTLS details, RBAC/ABAC patterns
  • Retry Strategies: Added exponential backoff, jitter, circuit breaker, timeout handling
  • Webhooks: Added replay protection, signature verification, delivery guarantees, management endpoints
  • OpenAPI: Added documentation requirements, schema design patterns, SDK generation guidelines
  • Versioning: Added link to VERSIONING.md for complete details

Alternative API Patterns (new):

  • GraphQL: Schema design, N+1 prevention, directives, persisted queries, federation, error handling
  • gRPC: Protocol Buffers, streaming patterns, backward compatibility, service mesh, error handling
  • AsyncAPI: Event-driven architecture, CQRS, saga patterns, DLQ, event monitoring

Bug Fixes:

  • Fixed STATUS_CODES.md header format (### → #)
  • Fixed PAGINATION.md to preserve original format with alternative envelope note

Type of Change

  • Documentation update
  • New section/guide
  • Bug fix (typo, broken link)
  • Code example improvement
  • Other:

Checklist

  • Commits are signed off (git commit -s)
  • Changes follow DNA principles (additive changes, preserved existing content)
  • Code examples tested (all examples are syntactically correct)
  • Links are valid (verified cross-references)
  • Self-review completed
  • No Russian text (verified with grep)

Related Issues

Comprehensive API documentation coverage:

  • ✅ REST (resources, pagination, filtering)
  • ✅ Errors (Problem+JSON, trace IDs)
  • ✅ Versioning & deprecations
  • ✅ Idempotency & retries
  • ✅ AuthN/AuthZ (API keys, OAuth2/OIDC, JWT, mTLS, scopes)
  • ✅ GraphQL (schema design, N+1, directives, persisted queries)
  • ✅ gRPC & Async APIs (contracts, streaming, compatibility)
  • ✅ Webhooks (signatures, replay protection, dead-letter)
  • ✅ Documentation (OpenAPI/AsyncAPI, SDKs, examples)

Files Changed

  • README.md - Updated structure with REST/GraphQL/gRPC/AsyncAPI sections
  • REST/API.md - Enhanced with retry strategies, auth details, webhooks, removed non-REST sections
  • REST/PAGINATION.md - Added alternative envelope format note
  • REST/STATUS_CODES.md - Fixed header format
  • GraphQL/API.md - New file with GraphQL guidelines
  • gRPC/API.md - New file with gRPC guidelines
  • AsyncAPI/API.md - New file with AsyncAPI guidelines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant