Nenuphar is a CLI application to generate Swagger UI OpenAPI definition files for your Dart Frog Server.
nenuphar.mp4
Dart Frog is a minimalistic backend framework for Dart.
To create a new Dart Frog backend project, run the following command:
dart pub global activate dart_frog_cli
dart_frog create <project name>dart pub global activate nenuphar_cliFirst you need to initialize your project by running the following command in the root of your project:
nenuphar initThis will create new file public/index.html. This file will be served statically by your Dart Frog server to expose your Swagger UI documentation.
Nenuphar scans your Dart Frog project to generate an OpenAPI definition file. Each route will generate the CRUD operations documentation for the exposed resource.
First create a Dart Frog route:
dart_frog new route "/todos"Then generate the OpenAPI definition file
nenuphar genThe openapi specification will be written in the public/openapi.json file.
This file is loaded by the public/index.html file to display the documentation.
You're now ready to start your Dart Frog server
dart_frog devVisit http://localhost:8080/index.html to see your documentation.
open http://localhost:8080/index.htmlThanks for using Nenuphar!
Please visit https://piotrfleury.github.io/nenuphar_cli/ for detailed documentation.
Generated by the Very Good CLI 🤖