+3
-23
README.md
+3
-23
README.md
···-This is a Cloudflare Worker with OpenAPI 3.1 using [chanfana](https://github.com/cloudflare/chanfana) and [Hono](https://github.com/honojs/hono).-This is an example project made to be used as a quick start into building OpenAPI compliant Workers that generates the-`openapi.json` schema automatically from code and validates the incoming request to the defined parameters or request body.-1. Sign up for [Cloudflare Workers](https://workers.dev). The free tier is more than enough for most use cases.+A Cloudflare Worker which works in conjunction with https://github.com/indexxing/Bluesky-Alt-Text. All endpoints are based off the original cloud function made by [symmetricalboy](https://github.com/symmetricalboy) [here](https://github.com/symmetricalboy/gen-alt-text/blob/main/functions/index.js), just in Typescript and prepackaged into a Cloudflare Worker environment.-3. For more information read the [chanfana documentation](https://chanfana.pages.dev/) and [Hono documentation](https://hono.dev/docs).-2. Open `http://localhost:8787/` in your browser to see the Swagger interface where you can try the endpoints.-3. Changes made in the `src/` folder will automatically trigger the server to reload, you only need to refresh the Swagger interface.+Documentation is served at the root of the worker deployment. There is a root path variable specified in the entrypoint file because my setup involves using a worker route wildcard on my custom domain.
+13
-14
src/endpoints/condense_text.ts
+13
-14
src/endpoints/condense_text.ts
······-"The approximate target length for the condensed text (e.g., number of sentences, characters, or words).",······+`You are an expert at writing concise, informative alt text. Please condense the following ${mediaType} description to be no more than ${targetLength} characters while preserving the most important details. The description needs to be accessible and useful for screen readers:`,
+1
-1
src/endpoints/generate.ts
+1
-1
src/endpoints/generate.ts
+15
-16
src/index.ts
+15
-16
src/index.ts
···+// The path which all routes are served from, for easy use with Worker Routes on custom domains.······
+2
-2
src/middleware/auth.ts
+2
-2
src/middleware/auth.ts
···
+6
src/types.ts
+6
src/types.ts
···
+6
-1
wrangler.jsonc
+6
-1
wrangler.jsonc
······