Skip to content

jderstd/hono

Repository files navigation

JDER Hono

A response builder for Hono.

This package includes different response builders based on the JSON response structure specified in JSON Data Errors Response (JDER). With the builders, various kinds of responses can be created easily instead of sending plain text responses.

Quick Start

To create a JSON response, use the following code:

import { createJsonResponse } from "@jderstd/hono/response";

const route = (): Response => {
    return createJsonResponse();
}

And the response will be shown as below:

{
    "success": true,
    "data": null,
    "errors": []
}

Documentation

For Hono, please refer to the Hono documentation.

For standard validator, please refer to the Standard Validator documentation.

For Zod validator, please refer to the Zod Validator documentation.

For OpenAPI, please refer to the OpenAPI documentation.

APIs

For Hono package APIs, please refer to the Hono APIs.

For standard validator package APIs, please refer to the Standard Validator APIs.

For Zod validator package APIs, please refer to the Zod Validator APIs.

For OpenAPI package APIs, please refer to the OpenAPI APIs.

Contributing

For contributing, please refer to the contributing guide.

License

This project is licensed under the terms of the MIT license.