More Premium Hugo Themes Premium Svelte Themes

Sveltekit Api Generator

Generates a Swagger UI and API client based on your SvelteKit API endpoints in +server.ts files

Sveltekit Api Generator

Generates a Swagger UI and API client based on your SvelteKit API endpoints in +server.ts files

Author Avatar Theme by langscot
Github Stars Github Stars: 22
Last Commit Last Commit: Aug 21, 2023 -
First Commit Created: Dec 18, 2023 -
Sveltekit Api Generator screenshot

Overview:

The project aims to provide type-safety for SvelteKit’s API endpoints by generating an OpenAPI schema and Swagger UI. It also generates a type-safe client library for the API. The project uses a Vite plugin to achieve this functionality. It is currently in the early stages of development and not ready for production use.

Features:

  • Type-safety for SvelteKit’s API endpoints
  • Generation of OpenAPI schema
  • Swagger UI to explore the API
  • Generation of type-safe client library
  • Vite plugin integration

Installation:

To install the plugin, follow these steps:

  1. Create a SvelteKit project if not already existing.
  2. Use TypeScript to define your +server.ts files in your SvelteKit project.
  3. Install the plugin.
  4. Add the plugin to your vite.config.ts file.

Summary:

The project provides type-safety for SvelteKit’s API endpoints by generating an OpenAPI schema and Swagger UI. It also generates a type-safe client library for the API. The project is still in development and not ready for production use. Contributions are welcome.