{"id":25806124,"url":"https://github.com/yandex-cloud-examples/yc-serverless-apigw-hello-world-typescript","last_synced_at":"2026-06-09T02:33:39.217Z","repository":{"id":277795190,"uuid":"771709705","full_name":"yandex-cloud-examples/yc-serverless-apigw-hello-world-typescript","owner":"yandex-cloud-examples","description":"Пример интеграции API Gateway и Yandex Cloud Functions с использованием контекста операции.","archived":false,"fork":false,"pushed_at":"2025-02-16T06:22:06.000Z","size":11,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-02-16T07:20:51.455Z","etag":null,"topics":["serverless","typescript","yandex-cloud","yandex-function","yandexcloud"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yandex-cloud-examples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-13T19:58:20.000Z","updated_at":"2024-03-13T19:58:48.000Z","dependencies_parsed_at":"2025-02-16T07:31:49.276Z","dependency_job_id":null,"html_url":"https://github.com/yandex-cloud-examples/yc-serverless-apigw-hello-world-typescript","commit_stats":null,"previous_names":["yandex-cloud-examples/yc-serverless-apigw-hello-world-typescript"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yandex-cloud-examples%2Fyc-serverless-apigw-hello-world-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yandex-cloud-examples%2Fyc-serverless-apigw-hello-world-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yandex-cloud-examples%2Fyc-serverless-apigw-hello-world-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yandex-cloud-examples%2Fyc-serverless-apigw-hello-world-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yandex-cloud-examples","download_url":"https://codeload.github.com/yandex-cloud-examples/yc-serverless-apigw-hello-world-typescript/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241053195,"owners_count":19901181,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["serverless","typescript","yandex-cloud","yandex-function","yandexcloud"],"created_at":"2025-02-27T19:59:36.814Z","updated_at":"2026-06-09T02:33:34.194Z","avatar_url":"https://github.com/yandex-cloud-examples.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Typescript Cloud Function Example\n\nПример интеграции API Gateway и Cloud Functions с использованием контеста операции. \nКонтекст операции - это параметр context расширения \n[x-yc-apigateway-integration:cloud_functions](https://cloud.yandex.ru/docs/api-gateway/concepts/extensions/cloud-functions) \nOpenAPI-спецификации. Значение данного параметра может иметь вложенную структуру, но ограничено размером в 2Kbyte. \nКонтекст операции позволяет параметризовать функцию-интеграцию для набора типовых операций OpenAPI-спецификации. \nВ примере API-гейтвей передает в функцию значение параметра пути запроса `/{name}` через поле\n`requestContext.apiGateway.operationContext.name`\n[контекста операции](https://cloud.yandex.ru/docs/functions/concepts/function-invoke#request)\n\n## Запуск\n\n1. Выполните `npm install` для установки зависимостей\n2. Выполните `npm run build` для сборки проекта\n3. Создайте облачную функции, в качестве среды выполнения выберите Node.js и вставьте код из build/index.js\n4. Создайте API Gateway и вставьте спецификацию из [openapi-example.yaml](openapi-example.yaml),\n   подставив в неё идентификатор ранее созданной функции\n\nДля тестирования откройте в браузере `https://\u003cслужебный домен созданного API-шлюза\u003e/world`\n\n## Запуск функции из терминала\n\n1. Выполните `npm install` для установки зависимостей\n2. Выполните `npm run build` для сборки проекта\n3. Выполните `node build/main \u003cjson request\u003e [\u003cjson context\u003e]`, передав аргументом json-запрос\n\n## Тесты\n\n    npm run test\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyandex-cloud-examples%2Fyc-serverless-apigw-hello-world-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyandex-cloud-examples%2Fyc-serverless-apigw-hello-world-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyandex-cloud-examples%2Fyc-serverless-apigw-hello-world-typescript/lists"}