{ "description": "Example of a Mustache template variable context for generating an OpenAPI-based REST API client", "engine": "mustache", "templateFile": "api-client.mustache", "context": { "apiName": "PetStore API", "packageName": "petstore-client", "version": "1.0.0", "baseUrl": "https://api.petstore.example.com/v1", "authType": "bearer", "operations": [ { "operationId": "listPets", "method": "GET", "path": "/pets", "summary": "List Pets", "returnType": "Pet[]" }, { "operationId": "createPet", "method": "POST", "path": "/pets", "summary": "Create Pet", "returnType": "Pet" } ] }, "renderedOutput": "// Auto-generated by OpenAPI Generator\nexport class PetStoreApiClient {\n private baseUrl = 'https://api.petstore.example.com/v1';\n\n async listPets(): Promise {\n const response = await fetch(`${this.baseUrl}/pets`);\n return response.json();\n }\n\n async createPet(pet: Pet): Promise {\n const response = await fetch(`${this.baseUrl}/pets`, {\n method: 'POST',\n body: JSON.stringify(pet)\n });\n return response.json();\n }\n}" }