Commit 1bd8b671 authored by Florent Poittevin's avatar Florent Poittevin
Browse files

refacto: change the way to export generated model that allow to add attribute transparently

parent 8206a3ec
......@@ -1790,9 +1790,9 @@
}
},
"@openapitools/openapi-generator-cli": {
"version": "1.0.10-4.0.0",
"resolved": "https://nexus.unige.ch/repository/npm-all/@openapitools/openapi-generator-cli/-/openapi-generator-cli-1.0.10-4.0.0.tgz",
"integrity": "sha512-d6X1CJN8CrRh1QJWF2arr9eohkRpAZ1tIA9V7N8DVC7vcTREQ6ry161I/7hVDRyZaq696kP/uJhBAmyVOwtqEA==",
"version": "1.0.10-4.2.3",
"resolved": "https://nexus.unige.ch/repository/npm-all/@openapitools/openapi-generator-cli/-/openapi-generator-cli-1.0.10-4.2.3.tgz",
"integrity": "sha512-Xo4rbz3aPiObpVS8oBUR0pHWYU5WBG/bmsJg16yCG7/vpGE8o1YsROTWMFfaMepWfxESrLP5XOqlBkZqbre7dw==",
"dev": true
},
"@schematics/angular": {
......
......@@ -30,8 +30,8 @@
"extract-translations:csv-to-json": "ngx-translate-extract-csv -r -i ./src/assets/i18n/translate.csv -o ./src/assets/i18n -s ;",
"extract-translations:json-to-csv": "ngx-translate-extract-csv -l fr,en,de -i ./src/assets/i18n -o ./src/assets/i18n/translate.csv -s ;",
"generate-version": "ts-node --project tsconfig-ts-node.json git.version.ts",
"generate-models": "(rm src/app/generated-api -fr || echo generated-api directory is absent) && openapi-generator generate -Dmodels -DsupportingFiles -i src/assets/openapi/DLCM-APIs.json -g typescript-angular -o src/app/generated-api --additional-properties=\"ngVersion=7.2.0,providedInRoot=true,modelSuffix=,modelFileSuffix=.model,fileNaming=kebab-case,prependFormOrBodyParameters=true,modelPropertyNaming=original\" --skip-validate-spec && npm run clean-after-models-generation",
"clean-after-models-generation": "cd src/app/generated-api && rm -fr .openapi-generator .gitignore .openapi-generator-ignore git_push.sh api api.module.ts configuration.ts encoder.ts index.ts variables.ts README.md && cp ../../assets/openapi/index-ts-to-copy.txt index.ts && cp ../../assets/openapi/README-txt-to-copy.txt README.txt",
"generate-models": "(rm src/app/generated-api -fr || echo generated-api directory is absent) && openapi-generator generate -Dmodels -DsupportingFiles -i src/assets/openapi/DLCM-APIs.json -g typescript-angular -o src/app/generated-api --additional-properties=\"ngVersion=7.2.0,providedInRoot=true,modelSuffix=,modelFileSuffix=.partial.model,fileNaming=kebab-case,prependFormOrBodyParameters=true,modelPropertyNaming=original\" --skip-validate-spec && npm run clean-after-models-generation",
"clean-after-models-generation": "cd src/app/generated-api && rm -fr .openapi-generator .gitignore .openapi-generator-ignore git_push.sh api api.module.ts configuration.ts encoder.ts index.ts variables.ts README.md && cp ../../assets/openapi/README-txt-to-copy.txt README.txt",
"build:sourcemaps": "node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng build --sourceMap --base-href /",
"build:sourcemaps-prod": "npm run build:sourcemaps -- --prod",
"build:sourcemaps-prod-local": "npm run build:sourcemaps -- -c production-local",
......@@ -93,7 +93,7 @@
"@angular/language-service": "8.2.11",
"@biesbjerg/ngx-translate-extract": "3.0.2",
"@ngxs/devtools-plugin": "3.5.1",
"@openapitools/openapi-generator-cli": "cli-4.0.0",
"@openapitools/openapi-generator-cli": "cli-4.2.3",
"@types/jasmine": "3.4.4",
"@types/jasminewd2": "2.0.8",
"@types/node": "12.11.2",
......
......@@ -10,7 +10,7 @@ import {
MAT_DIALOG_DATA,
MatDialogRef,
} from "@angular/material/dialog";
import {Person} from "@app/generated-api";
import {Person} from "@models";
import {AppPersonAction} from "@app/stores/person/app-person.action";
import {
Select,
......
......@@ -9,13 +9,13 @@ import {
FormBuilder,
Validators,
} from "@angular/forms";
import {
AccessOrganizationalUnit,
ApplicationRole,
} from "@app/generated-api";
import {SharedAbstractFormPresentational} from "@app/shared/components/presentationals/shared-abstract-form/shared-abstract-form.presentational";
import {UserApplicationRoleEnum} from "@app/shared/enums/user-application-role.enum";
import {BaseFormDefinition} from "@app/shared/models/base-form-definition.model";
import {
AccessOrganizationalUnit,
ApplicationRole,
} from "@models";
import {UserExtended} from "@shared/models/business/user-extended.model";
import {
EnumUtil,
......@@ -33,7 +33,6 @@ import {
})
export class UserForm extends SharedAbstractFormPresentational<UserExtended> {
formDefinition: FormComponentFormDefinition = new FormComponentFormDefinition();
applicationRolesNames: string[] = EnumUtil.convertToArray(UserApplicationRoleEnum, [UserApplicationRoleEnum.trusted_client]);
@Input()
......
......@@ -9,7 +9,7 @@ import {
MAT_DIALOG_DATA,
MatDialogRef,
} from "@angular/material";
import {DisseminationPolicy} from "@app/generated-api";
import {DisseminationPolicy} from "@models";
import {Store} from "@ngxs/store";
import {SharedAbstractDeleteDialog} from "@shared/components/dialogs/shared-abstract-delete/shared-abstract-delete.dialog";
import {LocalStateEnum} from "@shared/enums/local-state.enum";
......
......@@ -7,15 +7,15 @@ import {
FormBuilder,
Validators,
} from "@angular/forms";
import {DisseminationPolicy} from "@app/generated-api";
import {DisseminationPolicy} from "@models";
import {SharedAbstractFormPresentational} from "@shared/components/presentationals/shared-abstract-form/shared-abstract-form.presentational";
import {odConformanceEnum} from "@shared/enums/license.enums";
import {BaseFormDefinition} from "@shared/models/base-form-definition.model";
import {
EnumUtil,
PropertyName,
SolidifyValidator,
} from "solidify-frontend";
import {odConformanceEnum} from "@shared/enums/license.enums";
@Component({
selector: "dlcm-admin-dissemination-policy-form",
......@@ -61,5 +61,5 @@ class FormComponentFormDefinition extends BaseFormDefinition {
@PropertyName() name: string;
@PropertyName() destinationServer: string;
@PropertyName() subFolder: string;
@PropertyName() type: DisseminationPolicy.TypeEnum;
@PropertyName() type: string;
}
......@@ -9,7 +9,7 @@ import {
Component,
ViewChild,
} from "@angular/core";
import {DisseminationPolicy} from "@app/generated-api";
import {DisseminationPolicy} from "@models";
import {
Actions,
Select,
......
......@@ -10,7 +10,7 @@ import {
} from "@angular/core";
import {MatDialog} from "@angular/material";
import {ActivatedRoute} from "@angular/router";
import {DisseminationPolicy} from "@app/generated-api";
import {DisseminationPolicy} from "@models";
import {
Actions,
Select,
......
......@@ -7,7 +7,7 @@ import {
} from "@angular/core";
import {MatDialog} from "@angular/material/dialog";
import {ActivatedRoute} from "@angular/router";
import {DisseminationPolicy} from "@app/generated-api";
import {DisseminationPolicy} from "@models";
import {
Actions,
Store,
......
import {DisseminationPolicy} from "@app/generated-api";
import {DisseminationPolicy} from "@models";
import {LocalStateEnum} from "@shared/enums/local-state.enum";
import {
ResourceAction,
......
import {DisseminationPolicy} from "@app/generated-api";
import {DisseminationPolicy} from "@models";
import {
Actions,
Selector,
......
......@@ -8,7 +8,7 @@ import {
FormBuilder,
Validators,
} from "@angular/forms";
import {OrganizationalUnit} from "@app/generated-api";
import {OrganizationalUnit} from "@models";
import {FundingAgencyExtended} from "@deposit/models/funding-agency-extended.model";
import {SharedAbstractFormPresentational} from "@shared/components/presentationals/shared-abstract-form/shared-abstract-form.presentational";
import {LocalModelAttributeEnum} from "@shared/enums/model-attribute.enum";
......
......@@ -8,7 +8,7 @@ import {
ChangeDetectorRef,
Component,
} from "@angular/core";
import {FundingAgency} from "@app/generated-api";
import {FundingAgency} from "@models";
import {
Actions,
Select,
......
......@@ -14,7 +14,7 @@ import {ActivatedRoute} from "@angular/router";
import {
FundingAgency,
OrganizationalUnit,
} from "@app/generated-api";
} from "@models";
import {
Actions,
Select,
......
......@@ -7,7 +7,7 @@ import {
} from "@angular/core";
import {MatDialog} from "@angular/material/dialog";
import {ActivatedRoute} from "@angular/router";
import {FundingAgency} from "@app/generated-api";
import {FundingAgency} from "@models";
import {
Actions,
Store,
......
import {OrganizationalUnit} from "@app/generated-api";
import {OrganizationalUnit} from "@models";
import {LocalStateEnum} from "@shared/enums/local-state.enum";
import {
AssociationAction,
......
import {adminFundingAgenciesOrgUnitActionNameSpace} from "@admin/funding-agencies/stores/organizational-unit/admin-organizational-unit-preservation-policy.action";
import {OrganizationalUnit} from "@app/generated-api";
import {OrganizationalUnit} from "@models";
import {
Actions,
......
......@@ -9,7 +9,7 @@ import {
MAT_DIALOG_DATA,
MatDialogRef,
} from "@angular/material";
import {Institution} from "@app/generated-api";
import {Institution} from "@models";
import {Store} from "@ngxs/store";
import {SharedAbstractDeleteDialog} from "@shared/components/dialogs/shared-abstract-delete/shared-abstract-delete.dialog";
import {LocalStateEnum} from "@shared/enums/local-state.enum";
......
......@@ -7,7 +7,7 @@ import {
FormBuilder,
Validators,
} from "@angular/forms";
import {Institution} from "@app/generated-api";
import {Institution} from "@models";
import {SharedAbstractFormPresentational} from "@shared/components/presentationals/shared-abstract-form/shared-abstract-form.presentational";
import {BaseFormDefinition} from "@shared/models/base-form-definition.model";
import {RegexpUtil} from "@shared/utils/regexp.util";
......
......@@ -10,7 +10,7 @@ import {
OnInit,
ViewChild,
} from "@angular/core";
import {Institution} from "@app/generated-api";
import {Institution} from "@models";
import {
Actions,
Select,
......
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