@@ -28,16 +28,7 @@ console.log('--- Plugins Loaded ---');
2828app . get ( '/api/v1/meta/:type' , ( c ) => {
2929 const typePlural = c . req . param ( 'type' ) ;
3030
31- // Simple singularization mapping (can be enhanced)
32- const typeMap : Record < string , string > = {
33- 'objects' : 'object' ,
34- 'apps' : 'app' ,
35- 'flows' : 'flow' ,
36- 'reports' : 'report' ,
37- 'plugins' : 'plugin' ,
38- 'kinds' : 'kind'
39- } ;
40- const type = typeMap [ typePlural ] || typePlural ;
31+ const type = typePlural ; // Direct pass-through for exact match with Registry keys
4132
4233 const items = SchemaRegistry . listItems ( type ) ;
4334
@@ -66,15 +57,16 @@ app.get('/api/v1/meta/:type/:name', (c) => {
6657 const typePlural = c . req . param ( 'type' ) ;
6758 const name = c . req . param ( 'name' ) ;
6859
69- const typeMap : Record < string , string > = {
70- 'objects' : 'object' ,
71- 'apps' : 'app' ,
72- 'flows' : 'flow' ,
73- 'reports' : 'report' ,
74- 'plugins' : 'plugin' ,
75- 'kinds' : 'kind'
76- } ;
77- const type = typeMap [ typePlural ] || typePlural ;
60+ // const typeMap: Record<string, string> = {
61+ // 'objects': 'object',
62+ // 'apps': 'app',
63+ // 'flows': 'flow',
64+ // 'reports': 'report',
65+ // 'plugins': 'plugin',
66+ // 'kinds': 'kind'
67+ // };
68+ // const type = typeMap[typePlural] || typePlural;
69+ const type = typePlural ; // Direct pass-through
7870
7971 const item = SchemaRegistry . getItem ( type , name ) ;
8072 if ( ! item ) return c . json ( { error : `Metadata not found: ${ type } /${ name } ` } , 404 ) ;
0 commit comments