Commit 5092d460 authored by Florent POITTEVIN's avatar Florent POITTEVIN
Browse files

chore: update readme for open api generate model

parent 01157e46
Do not edit file inside this folder manually !
If you want to add missing attributes to a model, create a new interface that extend the existing.
Generated automatically with `npm run generate-models` command.
This models file are partials and need to be re-exported into `src\app\models\index.ts`.
This allow to add missing attribute transparently for the rest of the app.
export interface DepositsExtended extends Deposits {
missingAttribute1?: string;
missingAttribute2?: number;
How to reexport into `src\app\models\index.ts`
import {Deposit as DepositPartial} from "../generated-api/model/deposit.partial.model";
export interface Deposit extends DepositPartial {
extraProperty?: number;
}
Generated automatically with `npm run generate-models` command.
Usage :
The rest of the app need to import model only form `src\app\models\index.ts` :
import {Deposit} from "@models";
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment