Skip to content

Latest commit

 

History

History
32 lines (27 loc) · 654 Bytes

api-contract-template.md

File metadata and controls

32 lines (27 loc) · 654 Bytes

API Contract Documentation

Endpoint Template

endpoint:
  path: /api/resource
  method: POST
  authentication: required | optional | none
  
  request:
    contentType: application/json
    schema: # References schema definition
    required_fields: []
    optional_fields: []
    
  response:
    success:
      status: 200
      schema: # References schema definition
    errors:
      - status: 400
        conditions: [] # When this error occurs
        schema: # Error response structure
      
  rate_limiting:
    requests: number
    period: timeframe
    
  caching:
    strategy: none | client | server
    duration: timeframe