[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-11。"],[[["\u003cp\u003eAPI services utilize \u003ccode\u003e.proto\u003c/code\u003e files for API definition and \u003ccode\u003e.yaml\u003c/code\u003e files for service configuration.\u003c/p\u003e\n"],["\u003cp\u003eEach API service must reside in an API directory within an API repository, containing all definition files and build scripts.\u003c/p\u003e\n"],["\u003cp\u003eAn API directory should follow a standard layout including repository prerequisites, configuration files, documentation files, and interface definitions, like versioned sub-API directories, and type files for shared proto files.\u003c/p\u003e\n"],["\u003cp\u003ePublic Google API definitions are available on the \u003ca href=\"https://github.com/googleapis/googleapis\"\u003eGoogle APIs\u003c/a\u003e GitHub repository, as seen with the \u003ca href=\"https://github.com/googleapis/googleapis/tree/master/google/example/endpointsapis\"\u003eService Infrastructure Example API\u003c/a\u003e.\u003c/p\u003e\n"]]],[],null,["# Directory structure\n\nAPI services typically use `.proto` files to define the API surface and\n`.yaml` files to configure the API service. Each API service **must** have\nan API directory inside an API repository. The API directory **should**\ncontain all API definition files and build scripts.\n\nEach API directory **should** have the following standard layout:\n\n- API directory\n\n - Repository prerequisites\n\n - `BUILD` - The build file.\n - `METADATA` - The build metadata file.\n - `OWNERS` - The API directory owners.\n - `README.md` - The general information about the API service.\n - Configuration files\n\n - `{service}.yaml` - The baseline service config file, which is the YAML representation of the `google.api.Service` proto message.\n - `prod.yaml` - The prod delta service config file.\n - `staging.yaml` - The staging delta service config file.\n - `test.yaml` - The test delta service config file.\n - `local.yaml` - The local delta service config file.\n - Documentation files\n\n - `doc/*` - The technical documentation files. They should be in Markdown format.\n - Interface definitions\n\n - `v[0-9]*/*` - Each such directory contains a major version of the API, mainly the proto files and build scripts.\n - `{subapi}/v[0-9]*/*` - Each `{subapi}` directory contains interface definition of a sub-API. Each sub-API may have its own independent major version.\n - `type/*` - proto files containing types that are shared between different APIs, different versions of the same API, or between the API and service implementation. Type definitions under `type/*` **should** not have breaking changes once they are released.\n\nPublic Google API definitions are published on GitHub, see\n[Google APIs](https://github.com/googleapis/googleapis) repository.\n| **Note:** If you are a [Cloud Endpoints](/endpoints) developer, you can follow [Configuring a gRPC service](/endpoints/docs/grpc/grpc-service-config) to configure your API service."]]