shelf_swagger_ui 0.0.1
shelf_swagger_ui: ^0.0.1 copied to clipboard
Present clean and professional documentation with Swagger + shelf.
example/shelf_swagger_ui_example.dart
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 = args.isNotEmpty ? args[0] : 'swagger.yaml';
final handler = SwaggerUI(path, title: 'Swagger Test');
var server = await io.serve(handler, '0.0.0.0', 4001);
print('Serving at http://${server.address.host}:${server.port}');
}