디렉터리 구조
API 서비스는 일반적으로 .proto
파일을 사용하여 API 표면을 정의하고 .yaml
파일을 사용하여 API 서비스를 구성합니다. API 서비스마다 API 저장소에 API 디렉터리가 있어야 합니다. API 디렉터리에는 모든 API 정의 파일과 빌드 스크립트가 포함되어야 합니다.
API 디렉터리는 다음과 같은 표준 레이아웃이 필요합니다.
API 디렉터리
저장소 기본 요건
BUILD
- 빌드 파일
METADATA
- 빌드 메타데이터 파일
OWNERS
- API 디렉터리 소유자
README.md
- API 서비스에 대한 일반 정보입니다.
구성 파일
{service}.yaml
- google.api.Service
proto 메시지의 YAML 표현인 기준 서비스 구성 파일입니다.
prod.yaml
- 프로덕션 델타 서비스 구성 파일입니다.
staging.yaml
- 스테이징 델타 서비스 구성 파일입니다.
test.yaml
- 테스트 델타 서비스 구성 파일
local.yaml
- 로컬 델타 서비스 구성 파일입니다.
문서 파일
doc/*
- 기술 문서 파일입니다. 이 파일은 마크다운 형식을 따라야 합니다.
인터페이스 정의
v[0-9]*/*
- 이러한 디렉터리마다 API의 주 버전, proto 파일, 빌드 스크립트가 포함됩니다.
{subapi}/v[0-9]*/*
- 각 {subapi}
디렉터리에는 하위 API의 인터페이스 정의가 포함됩니다. 각 하위 API에는 독립적인 고유한 주 버전이 있을 수 있습니다.
type/*
- 서로 다른 API 간에, 동일한 API의 여러 버전 간에 또는 API와 서비스 구현 간에 공유되는 유형이 포함된 proto 파일입니다. type/*
아래 유형 정의는 출시되었을 때 브레이킹 체인지가 있어서는 안 됩니다.
공개 Google API 정의는 GitHub에 게시됩니다. Google API 저장소를 참조하세요. 디렉터리 구조에 관한 자세한 내용은 Service Infrastructure Example API를 참조하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-04-30(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-04-30(UTC)"],[[["\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,[]]