mirror of
https://github.com/longbridge/developers.git
synced 2026-09-19 03:34:09 +08:00
807 B
807 B
OpenAPI-driven API Validation
This project now supports an OpenAPI-first validation flow for HTTP API docs.
Files
- OpenAPI baseline spec:
openapi/openapi.baseline.json - Case generator:
script/generate-cases-from-openapi.mjs - Runtime validator:
script/validate-http-apis.mjs
Workflow
- Update OpenAPI spec with documented endpoints
# edit openapi/openapi.baseline.json
- Generate validation cases from OpenAPI
npm run generate:api-cases
- Run API validation against real environment (
openapi.longbridge.xyzby default)
npm run validate:apis
Rule
For every API doc you add/update:
- Add/adjust corresponding OpenAPI operation
- Keep
x-validationexpectations updated - Run generation + validation
- Attach validation output in PR