Sveltekit Api Generator screenshot

Sveltekit Api Generator

Author Avatar Theme by Langscot
Updated: 21 Aug 2023
22 Stars

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

Categories

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.