Services need access to named static or dynamic data. This data may be known statically at synth time, after deployment time, or could be created once and updated later. This data may also need to be exposed as static assets to the API.
These same files should also be generated for and work for the local dev server.
Use Case:
Hosted schema for openai plugings. The ai-plugin.json may have both generated and static values. The OpenAPI specification used by open AI may be generated or use the specification generated by eventual. Both of these documents need to be exposed at HTTP urls.
Static HTML files for a single page application
Uploading a file a static images for use in a website
// in service
const specification = asset.fromInfra("specification");
api.asset("spec.json", specification);
// in CDK
service.assets.specification.value = service.specification;
// in service
// path to a local folder of images
const images = asset.folder("images", "./images");
api.asset("images", images);
Services need access to named static or dynamic data. This data may be known statically at synth time, after deployment time, or could be created once and updated later. This data may also need to be exposed as static assets to the API.
These same files should also be generated for and work for the local dev server.
Use Case:
ai-plugin.json
may have both generated and static values. The OpenAPI specification used by open AI may be generated or use the specification generated by eventual. Both of these documents need to be exposed at HTTP urls.