Skip to content

interastar/lab-openapi

Repository files navigation

OpenAPI Template

Deploy to Cloudflare

OpenAPI Template Preview

This is a Cloudflare Worker with OpenAPI 3.1 Auto Generation and Validation using chanfana and Hono.

This is an lab project made to be used for training in CX flows that consume OpenAPI compliant web services that generates the openapi.json schema automatically from code and validates the incoming request to the defined parameters or request body.

This template includes various endpoints.

Testing

This template includes integration tests using Vitest. To run the tests locally:

pnpm run test

Test files are located in the tests/ directory, with examples demonstrating how to test your endpoints and database interactions.

Project structure

  1. Main router is defined in src/index.ts.
  2. Each endpoint has its own file in src/endpoints/.
  3. Integration tests are located in the tests/ directory.
  4. For more information read the chanfana documentation, Hono documentation, and Vitest documentation.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •