feat: serve OpenAPI spec at /api/v1/openapi.json
Registers a handler that serves the embedded OpenAPI 3.0 spec (compiled into the binary via oapi-codegen) at a browseable endpoint. Uses gen.GetSwagger() to deserialize the embedded base64+gzip spec and returns it as JSON. 46 paths, 42 schemas — agents and humans can now introspect the full API surface without reading Go source.
This commit is contained in:
15
vendor/package.json
vendored
15
vendor/package.json
vendored
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"name": "@joan/procedural-glyph-engine",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "./src/index.js",
|
||||
"module": "./src/index.js",
|
||||
"types": "./types/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./src/index.js",
|
||||
"types": "./types/index.d.ts"
|
||||
}
|
||||
}
|
||||
}
|
||||
13
vendor/src/index.js
vendored
13
vendor/src/index.js
vendored
@@ -1,13 +0,0 @@
|
||||
export function createGlyph(_seed, resolution) {
|
||||
const size = resolution
|
||||
const half = size / 2
|
||||
return `<svg viewBox="0 0 ${size} ${size}" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="${size}" height="${size}" fill="#1a1a2e"/>
|
||||
<circle cx="${half}" cy="${half}" r="${half * 0.35}" fill="none" stroke="#bc8cff" stroke-width="1.5"/>
|
||||
<circle cx="${half}" cy="${half}" r="${half * 0.18}" fill="#bc8cff"/>
|
||||
<line x1="${half}" y1="${half * 0.2}" x2="${half}" y2="${half * 0.65}" stroke="#58a6ff" stroke-width="1.5"/>
|
||||
<line x1="${half * 0.2}" y1="${half}" x2="${half * 0.65}" y2="${half}" stroke="#58a6ff" stroke-width="1.5"/>
|
||||
<line x1="${half * 1.35}" y1="${half}" x2="${half * 0.65}" y2="${half}" stroke="#3fb950" stroke-width="1.5"/>
|
||||
<line x1="${half}" y1="${half * 1.8}" x2="${half}" y2="${half * 0.65}" stroke="#3fb950" stroke-width="1.5"/>
|
||||
</svg>`
|
||||
}
|
||||
Reference in New Issue
Block a user