https://github.com/lukehedger/contract-first
JSON Schema-based, client-server data definitions for contract-first development
https://github.com/lukehedger/contract-first
aws-apigateway aws-eventbridge aws-lambda json-schema openapi typescript
Last synced: about 2 months ago
JSON representation
JSON Schema-based, client-server data definitions for contract-first development
- Host: GitHub
- URL: https://github.com/lukehedger/contract-first
- Owner: lukehedger
- License: mit
- Created: 2020-11-27T18:28:26.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-02-24T20:32:36.000Z (over 4 years ago)
- Last Synced: 2025-02-09T15:18:14.786Z (4 months ago)
- Topics: aws-apigateway, aws-eventbridge, aws-lambda, json-schema, openapi, typescript
- Language: TypeScript
- Homepage:
- Size: 104 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://github.com/Redocly/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_