Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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 18 hours ago
JSON representation

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

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_

![Untitled-2020-12-01-1940](https://user-images.githubusercontent.com/1913316/100788961-b91f7d80-340d-11eb-9b22-558901aaf92c.png)