-
Notifications
You must be signed in to change notification settings - Fork 354
Description
Is your feature request related to a problem? Please describe.
I've setup an nx monorepo, and created a lib, which should export a mesh sdk.
For actual endpoints I still need to overwrite the source/metadata, so I am using a (patched) backup metadata file, for two OpenAPI endpoints (until they are fixed) and a backup of a long OData metadata.xml file to shorten the introspection delay.
Now within the nx monorepo, these metadata files need to be treated as assets and copied around with the sdk-lib, because it goes looking for them at runtime.
Describe the solution you'd like
I want to be able to generate an sdk with mesh instance without handling additional non js assets (json/xml/yaml).
For now I am successful configuring the mesh instance programmatically, but to export a built lib we need to put some more effort in.
For OpenAPI I can easily feed the JSON directly, if I adjust the handler a bit - PR incoming!
For OData, it could be possible to do something similar (include the xml string at build time).
Describe alternatives you've considered
I don't know. I am not supposed to skip introspection I think, but it might still be a common usecase to embed API metadata.
Additional context
Functions like "findAndParseConfig" or "utils.readFileOrUrlWithCache" look for files in a relative directory - this breaks when trying to export a library - relative lookup is by process.cwd