feat: refonte métadonnées API + UX dossiers et import
- Nouveau schéma api_entries : convention+name, version X.X.X, provider, contacts splitées (name/entity/email), suppression des anciens champs - Formulaire upload étape 2 : convention+nom, version 3 champs, fournisseur, contacts métier et technique obligatoires ; type détecté auto → select désactivé - Validation YAML : redocly.yaml (extends: spec), support noms avec espaces, extraction métadonnées (name, version, description) depuis info YAML - Dossiers : modale création avec champ Emplacement pré-initialisé depuis le contexte de navigation, options └ avec indentation par profondeur - Import depuis un dossier : pré-sélection de la catégorie via queryParam - Recherche étendue : name, provider, description, contacts - Résolution @datacat/shared via workspace:* + compilation CJS avant NestJS Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -1,14 +1,33 @@
|
||||
import { IsString, IsNotEmpty, IsIn, IsOptional, IsUUID } from 'class-validator';
|
||||
import { ApiType } from '@datacat/shared';
|
||||
import { IsString, IsNotEmpty, IsIn, IsOptional, IsUUID, IsInt, Min, IsEmail } from 'class-validator';
|
||||
import { Type } from 'class-transformer';
|
||||
import { ApiType, ApiConvention } from '@datacat/shared';
|
||||
|
||||
export class CreateApiEntryDto {
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
title!: string;
|
||||
@IsIn(['CONSULTER', 'ENREGISTRER', 'ETRE_NOTIFIE'])
|
||||
convention!: ApiConvention;
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
version!: string;
|
||||
name!: string;
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
provider!: string;
|
||||
|
||||
@IsInt()
|
||||
@Min(0)
|
||||
@Type(() => Number)
|
||||
versionMajor!: number;
|
||||
|
||||
@IsInt()
|
||||
@Min(0)
|
||||
@Type(() => Number)
|
||||
versionMinor!: number;
|
||||
|
||||
@IsInt()
|
||||
@Min(0)
|
||||
@Type(() => Number)
|
||||
versionPatch!: number;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
@@ -26,26 +45,24 @@ export class CreateApiEntryDto {
|
||||
categoryId?: string;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
functionalDoc?: string;
|
||||
@IsNotEmpty()
|
||||
contactFunctionalName!: string;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
technicalDoc?: string;
|
||||
@IsNotEmpty()
|
||||
contactFunctionalEntity!: string;
|
||||
|
||||
@IsEmail()
|
||||
contactFunctionalEmail!: string;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
externalDocUrl?: string;
|
||||
@IsNotEmpty()
|
||||
contactTechnicalName!: string;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
contactFunctional?: string;
|
||||
@IsNotEmpty()
|
||||
contactTechnicalEntity!: string;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
contactTechnical?: string;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
accessRights?: string;
|
||||
@IsEmail()
|
||||
contactTechnicalEmail!: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user