From a692e0f3d54a1d4b30672c2ce548d69f0b386cd6 Mon Sep 17 00:00:00 2001 From: Tony Date: Mon, 8 Feb 2021 17:09:52 +0100 Subject: [PATCH] update README --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 087b452..dd1e602 100644 --- a/README.md +++ b/README.md @@ -27,25 +27,25 @@ sts -c .stsconfig.js `sts input -g inputGroup -o output ...` ### required -* **input** +* **input** Strapi folder(s) with models *.settings.json You may define multiple inputs. In case your API models have relations to other plugins like 'users-permissions'. `sts path/to/strapi/api/ path/to/strapi/plugins/users-permissions/models -o path/to/your/types/dir/` -* **-g inputGroup** +* **-g inputGroup** Strapi folder(s) with groups models ### optional -* **-o output** +* **-o output** Output folder -* **-n nested** +* **-n nested** Put all interfaces in a nested tree instead of directly under the output folder -* **-u collectionCanBeUndefined** +* **-u collectionCanBeUndefined** By default, all collection can not be undefined. You can turn this off, so only unrequired collections may be undefined. -* **-e Enumeration** +* **-e Enumeration** You may generate **enumeration** or **string literal** Example: - ```typescript +```typescript // enumeration (with -e option) export interface IOrder { payment: IOrderPayment; @@ -58,9 +58,9 @@ export enum IOrderPayment { export interface IOrder { payment: "card" | "check"; } - ``` +``` -* **-c Advanced configuration** +* **-c Advanced configuration** path to configuration file # Advanced configuration @@ -121,4 +121,4 @@ The input folder is recursively processed and each model file is read. When done ```sh npm install && npm run build # output files generated in dist folder -``` \ No newline at end of file +```