搜尋套件、儲存庫與 APP 分類

套件詳情v0.2.2

nenuphar_cli

由 Very Good CLI 創建的用於 Dart Frog 的 OpenAPI 生成 CLI。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
58
喜歡數
29
Pub 分數
130

安裝套件

flutter pub add nenuphar_cli

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

Nenuphar CLI 是一個命令列工具,可從 API 定義產生 OpenAPI 規範與 Dart 程式碼,特別設計用於整合 Dart Frog。由 Very Good CLI 建立,它透過自動化根據 OpenAPI 模式建立類型安全的客戶端程式碼,簡化後端至前端的開發流程。該工具支援多個平台,包括 Android、iOS、Web、macOS、Windows 與 Linux,非常適合全端 Dart 應用程式。它透過減少手動撰寫樣板程式碼並確保 API 合約與實作之間的一致性,提升開發者生產力。

適用情境

  • 從 OpenAPI 規範生成客戶端代碼
  • 自動化API契約同步
  • 將 OpenAPI 集成到 Dart Frog 專案中
  • 簡化全端 Dart 開發
  • 在Flutter應用中啟用類型安全的API呼叫

主要特色

  • OpenAPI 規範生成
  • Dart 客戶端程式碼產生
  • 無縫 Dart Frog 結合
  • 多平台支援
  • 用於自動化的命令列介面
  • 支援 REST API 合約

適合對象

  • Dart Frog 開發者
  • 全-stack Dart 團隊
  • 以 API 為先的開發工作流程
  • 使用 OpenAPI 規範的團隊
  • 尋求自動化客戶端生成的開發者

使用建議

  • 需要以 OpenAPI 規範作為輸入
  • 僅限 Dart Frog 生態系統
  • 依賴外部 OpenAPI 模式品質
  • 可能需要為複雜 API 進行設定
  • 不適用於非 Dart Frog 專案

原始 README

以下為關聯原始碼儲存庫的 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

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 🎉

Thanks for using Nenuphar!

Detailed documentation

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

Generated by the Very Good CLI 🤖


所屬分類

依賴

依賴清單 6 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。