You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extend the open-source Fiori Elements/ Fiori Freesryle writer's generate method to support annotation writing as part of the app generation process. This can be done by -
Adding an optional property writeAnnotations to the appOptions of the FioriElementsApp interface here.
packages/fiori-elements-writer/src/types.ts
import{typeGenerateAnnotationsOptions}from'@sap-ux/annotation-generator';interfaceWriteAnnotationsConfigextendsGenerateAnnotationsOptions{/* The name of the service, CAP service name or 'mainService' by default. */serviceName: string;}exportinterfaceFioriElementsApp<T>extendsUi5App{template: Template<T>;service: Omit<OdataService,'model'>;// Model name will use defaultsapp: FioriApp;appOptions: Partial<AppOptions>&{
....addTests?: boolean;writeAnnotations?: WriteAnnotationsConfig;};}
Update the generate Method of the Fiori Elements Writer. Check if writeAnnotations is provided in appOptions. If it's present, the annotation writing logic will be invoked during the app generation. packages/fiori-elements-writer/src/index.ts
import{generateAnnotations,typeAnnotationServiceParameters}from'@sap-ux/annotation-generator';exportasyncfunctiongenerate<T>(destinationPath: string,app: FioriElementsApp<T>,fs: Editor): Promise<void>{// Existing logic for file generation
...
// Handle annotation writing if configuration is providedif(app.appOptions.writeAnnotations){const{ serviceName, ...annotationOptions}=feApp.appOptions.writeAnnotations;constannoServiceParams: AnnotationServiceParameters={
serviceName,appName: feApp.package.name,project: // get project path from annotationFilePath };awaitgenerateAnnotations(fs,annoServiceParams,annotationOptions);}
...
}
Architecture Elaboration
Does it requires architecture elaboration?
Notes
Tasks
Adding an optional property writeAnnotations to the appOptions of the FioriElementsApp interface
Update the generate Method of the Fiori Elements Writer
The text was updated successfully, but these errors were encountered:
kjose90
changed the title
FEATURE - Add an option to open source FE writer generate to enable writing annotations.
FEATURE - Add an option to open source FE/FF writer generate to enable writing annotations.
Jan 14, 2025
kjose90
changed the title
FEATURE - Add an option to open source FE/FF writer generate to enable writing annotations.
FEATURE - Add an option to open source FEwriter generate to enable writing annotations.
Jan 30, 2025
Extend the open-source Fiori Elements/ Fiori Freesryle writer's generate method to support annotation writing as part of the app generation process. This can be done by -
writeAnnotations
to theappOptions
of theFioriElementsApp
interface here.packages/fiori-elements-writer/src/types.ts
generate
Method of the Fiori Elements Writer. Check ifwriteAnnotations
is provided inappOptions
. If it's present, the annotation writing logic will be invoked during the app generation.packages/fiori-elements-writer/src/index.ts
Architecture Elaboration
Does it requires architecture elaboration?
Notes
Tasks
writeAnnotations
to theappOptions
of theFioriElementsApp
interfacegenerate
Method of the Fiori Elements WriterThe text was updated successfully, but these errors were encountered: