Skip to content

Commit

Permalink
optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
moweiran committed Dec 21, 2023
1 parent be99d4f commit cd17748
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.0.7

- add more information for install
- add github action for automated publishing

## 1.0.6

- chang readme for install and usage.
Expand Down
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,32 @@ A package for convert from json to model by http api
flutter pub add json_parse_model -d
flutter pub add build_runner -d

## 1. Add json2model.yaml to root path, the file format like below

host: <host>
token: <token>

example:

host: http://www.baidu.com/api
token: xxxlxlxlxlx.lxlxlxl.xlxlx.xlxlxlxlx

## 2. Add json file to assets/json/xxx.json, the format like below

{
"api": "<your api path>",
"outpath": "lib/json2model_gen/<model_file_name>.dart",
"className": "<modelName>"
}

example:

{
"api": "/api/v1/healing",
"outpath": "lib/json2model_gen/healing.dart",
"className": "Healing"
}

# Run build to generate json model.

## 1. Used as Package
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: json_parse_model
description: A package for convert from json to model by http api
version: 1.0.6
version: 1.0.7
repository: https://github.com/moweiran/json_parse_model.git

environment:
Expand Down

0 comments on commit cd17748

Please sign in to comment.