Search packages, repositories and app categories

shelf_swagger_ui cover
Package detailsv2.0.0

shelf_swagger_ui

Present clean and professional documentation with Swagger + shelf.

AndroidiOSmacOSWindowsLinux
30-day downloads
2.3K
Likes
85
Pub points
145

Install package

flutter pub add shelf_swagger_ui

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Shelf_Swagger_UI is a Flutter/Dart package that integrates Swagger UI with the Shelf web server framework, enabling developers to generate and serve clean, interactive API documentation. It simplifies the process of showcasing OpenAPI-compliant APIs with a professional, user-friendly interface. The package is ideal for backend services built with Shelf, offering real-time API exploration directly in the browser. It supports dynamic documentation rendering from OpenAPI specifications, making it easy to maintain and share API contracts across teams.

Use cases

  • Serve interactive API documentation
  • Document Shelf-based REST APIs
  • Enable real-time API testing
  • Integrate with backend development workflows
  • Support team collaboration on API design

Key features

  • Seamless integration with Shelf
  • Dynamic Swagger UI rendering
  • Supports OpenAPI specifications
  • Browser-based interactive documentation
  • Easy setup with minimal configuration

Suitable for

  • Backend developers using Shelf
  • Teams needing API documentation
  • Projects with OpenAPI-compliant APIs
  • Development environments requiring live API previews
  • Flutter-backed backend services

Considerations

  • Requires Shelf server setup
  • Not intended for frontend use
  • Documentation must be manually updated if API changes
  • Limited customization beyond Swagger UI defaults
  • Best suited for development and staging, not production deployment without security measures

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Shelf SwaggerUI

Present, clean and professional documentation with Swagger + shelf; alt text

Example

Get a YAML or JSON schema file. Ex: (specs/swagger.yaml)

openapi: 3.0.0
info:
  description: "API system"
  version: "1.0.10"
  title: "Swagger Test"
servers:
  - url: http://my-service.info
    description: Remote server
tags:
- name: "user"
  description: "Access to User"

Configure the handler with Shelf:

import 'package:shelf/shelf_io.dart' as io;
import 'package:shelf_swagger_ui/shelf_swagger_ui.dart';

void main(List<String> args) async {
  final path = 'specs/swagger.yaml';
  final handler = SwaggerUI.fromFile(File(path), title: 'Swagger Test');
  var server = await io.serve(handler, '0.0.0.0', 4001);
  print('Serving at http://${server.address.host}:${server.port}');
}

That`s it!

Categories

Dependencies

Dependency list 5 items

Source repository

Projects using this package

No data available yet.