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

https://github.com/jderstd/hono

A response builder for Hono
https://github.com/jderstd/hono

builder hono javascript jder json response typescript

Last synced: about 2 months ago
JSON representation

A response builder for Hono

Awesome Lists containing this project

README

          

# 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)](https://github.com/jderstd/spec). 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:

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

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

And the response will be shown as below:

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

## Documentation

For Hono,
please refer to the [Hono documentation](./docs/hono/README.md).

For standard validator,
please refer to the [Standard Validator documentation](./docs/hono-standard-validator/README.md).

For Zod validator,
please refer to the [Zod Validator documentation](./docs/hono-zod-validator/README.md).

For OpenAPI,
please refer to the [OpenAPI documentation](./docs/hono-openapi/README.md).

## APIs

For Hono package APIs,
please refer to the [Hono APIs](./apis/hono/README.md).

For standard validator package APIs,
please refer to the [Standard Validator APIs](./apis/hono-standard-validator/README.md).

For Zod validator package APIs,
please refer to the [Zod Validator APIs](./apis/hono-zod-validator/README.md).

For OpenAPI package APIs,
please refer to the [OpenAPI APIs](./apis/hono-openapi/README.md).

## Contributing

For contributing, please refer to the [contributing guide](./CONTRIBUTING.md).

## License

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