{"openapi":"3.1.0","info":{"title":"GetTemplate API","version":"1.0.0","description":"Public HTTP APIs for gettemplate.app — search catalog, component library, form source, and related tools. Errors use structured JSON: { error: { code, message, hint? } }.","contact":{"name":"GetTemplate","url":"https://gettemplate.app"}},"servers":[{"url":"https://gettemplate.app","description":"Production"}],"paths":{"/api/search/catalog":{"get":{"operationId":"getSearchCatalog","summary":"Global search catalog","description":"Returns searchable items across templates, forms, widgets, premium templates, and pages.","responses":{"200":{"description":"Catalog payload","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object"}},"counts":{"type":"object"}}}}}},"405":{"$ref":"#/components/responses/JsonError"},"500":{"$ref":"#/components/responses/JsonError"}}}},"/api/library/catalog":{"get":{"operationId":"getLibraryCatalog","summary":"Component library catalog","description":"Lists templates, forms, and widgets available in the library.","responses":{"200":{"description":"Library catalog","content":{"application/json":{"schema":{"type":"object"}}}},"405":{"$ref":"#/components/responses/JsonError"},"500":{"$ref":"#/components/responses/JsonError"}}}},"/api/library/source":{"get":{"operationId":"getLibrarySource","summary":"Fetch library item source","parameters":[{"name":"type","in":"query","schema":{"type":"string"}},{"name":"id","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Source code payload","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/JsonError"},"404":{"$ref":"#/components/responses/JsonError"},"405":{"$ref":"#/components/responses/JsonError"}}}},"/api/forms/get-code":{"get":{"operationId":"getFormCode","summary":"Load form component source","parameters":[{"name":"path","in":"query","required":true,"schema":{"type":"string"}},{"name":"export","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Form source","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/JsonError"},"405":{"$ref":"#/components/responses/JsonError"}}}},"/api/health":{"get":{"operationId":"getHealth","summary":"Health check","responses":{"200":{"description":"Service is up","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"service":{"type":"string"}}}}}},"405":{"$ref":"#/components/responses/JsonError"}}}},"/openapi.json":{"get":{"operationId":"getOpenApi","summary":"This OpenAPI document","responses":{"200":{"description":"OpenAPI 3.1 JSON","content":{"application/json":{"schema":{"type":"object"}}}}}}}},"components":{"schemas":{"ApiError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"},"details":{}}}}}},"responses":{"JsonError":{"description":"Structured JSON error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}