Skip to content

pboth1304/vue-swagger-ui-demo

Repository files navigation

SwaggerUI with Custom Plugins in Vue 3

This project was built for the following blog article demonstrates how to integrate SwaggerUI into a Vue 3 application and create custom React-based plugins to extend SwaggerUI's functionality. It showcases a Star Wars-themed API browser with custom UI components.

Features

  • Vue 3 + TypeScript + Vite setup
  • SwaggerUI integration within a Vue application
  • Custom React plugins for SwaggerUI without React as a dependency
  • Star Wars API data display with custom components
  • Tailwind CSS for styling

Why This Project Exists

SwaggerUI provides a powerful system for extending its functionality through plugins. While SwaggerUI itself is built with React, you can create custom plugins for it using React even in a Vue application. This is possible because SwaggerUI provides its own React instance through its system context.

This project serves as a practical example for a blog article showcasing this integration pattern.

Getting Started

# Install dependencies
npm install

# Start the development server
npm run dev

# Build for production
npm run build

# Preview the production build
npm run preview

Project Structure

  • src/plugins/: Contains SwaggerUI plugins and React components
  • src/types.ts: TypeScript interfaces used throughout the project
  • src/api-specification.ts: SwaggerUI API specification
  • App.vue: Main Vue component that integrates SwaggerUI

Learn More

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published