Skip to content

JSON Schema-based, client-server data definitions for contract-first development

License

Notifications You must be signed in to change notification settings

lukehedger/contract-first

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contract-First Development

Universal Schema

JSON Schema-based, client-server data definitions for contract-first development

Shared (Frontend and Backend)

  • JSON Schema to define API requests and responses, including error responses

Frontend

  • Yup schema to validate user input, generated from shared JSON Schema
  • TypeScript type definitions to validate developer input (request and response), generated from shared JSON Schema

Backend

  • API request validation to validate user/client-generated input, generated from shared JSON Schema
  • OpenAPI specification, generated from shared JSON Schema
  • Optional: API documentation, generated from OpenAPI specification (e.g. ReDoc)

Example

  • React app with Yup form validation and TypeScript type-checking
  • Lambda function with typed event body
  • Optional: EventBridge Schema Registry and event bus

Untitled-2020-12-01-1940

About

JSON Schema-based, client-server data definitions for contract-first development

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published