FLUTTER ECOSYSTEM

PiotrFLEURY/nenuphar_cli

Dart Frog용 openapi.json 파일을 생성하는 매우 좋은 Dart CLI

nenuphar_cli 프로젝트 이미지
Stars
21
Forks
1
최근 푸시(UTC)
2024. 9. 6.
프로젝트 상태
활성
Piotr FLEURY GitHub avatar
GITHUB User

Piotr FLEURY ↗

XPEHOFrance
언어DartHTML

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 13 개

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

Nenuphar - Your OpenAPI generator CLI

nenuphar logo generated using Microsoft Designer

style: very good analysis License: MIT

Nenuphar is a CLI application to generate Swagger UI OpenAPI definition files for your Dart Frog Server.

https://github.com/PiotrFLEURY/nenuphar_cli/assets/25879276/1590e803-7888-4fa0-8555-2f29f2035bd1


Dart Frog

https://raw.githubusercontent.com/PiotrFLEURY/nenuphar_cli/main/docs/pictures/dart_frog_logo.svg

Dart Frog is a minimalistic backend framework for Dart.

Create a new Dart Frog project

To create a new Dart Frog backend project, run the following command:

dart pub global activate dart_frog_cli
dart_frog create <project name>

Nenuphar CLI

Installation

dart pub global activate nenuphar_cli

Initialize your project

First you need to initialize your project by running the following command in the root of your project:

nenuphar init

This will create new file public/index.html. This file will be served statically by your Dart Frog server to expose your Swagger UI documentation.

Generate openapi definition file

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 gen

The 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.

Start your Dart Frog server

You're now ready to start your Dart Frog server

dart_frog dev

Visit http://localhost:8080/index.html to see your documentation.

open http://localhost:8080/index.html

Enjoy 🎉

https://raw.githubusercontent.com/PiotrFLEURY/nenuphar_cli/main/docs/pictures/nenuphar_swagger.png

Thanks for using Nenuphar!

Detailed documentation

Please visit https://piotrfleury.github.io/nenuphar_cli/ for detailed documentation.

Generated by the Very Good CLI 🤖