Skip to content

Commit 87a1005

Browse files
authored
docs: use consistent library id in flags and examples (#2770)
Use `secretmanager` as an example of library ID in flags and examples. Fixes #2704
1 parent a2a41a4 commit 87a1005

File tree

6 files changed

+28
-28
lines changed

6 files changed

+28
-28
lines changed

cmd/librarian/doc.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ Flags:
115115
Language specific image used to invoke code generation and releasing.
116116
If not specified, the image configured in the state.yaml is used.
117117
-library string
118-
The library ID to generate or release (e.g. google-cloud-secretmanager-v1).
118+
The library ID to generate or release (e.g. secretmanager).
119119
This corresponds to a releasable language unit.
120120
-output string
121121
Working directory root. When this is not specified, a working directory
@@ -203,7 +203,7 @@ Flags:
203203
Language specific image used to invoke code generation and releasing.
204204
If not specified, the image configured in the state.yaml is used.
205205
-library string
206-
The library ID to generate or release (e.g. google-cloud-secretmanager-v1).
206+
The library ID to generate or release (e.g. secretmanager).
207207
This corresponds to a releasable language unit.
208208
-library-version string
209209
Overrides the automatic semantic version calculation and forces a specific

doc/config-schema.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ global_files_allowlist:
5454
permissions: "write-only"
5555
# A list of library overrides
5656
libraries:
57-
- id: "example-library"
57+
- id: "secretmanager"
5858
next_version: "2.3.4"
5959
generate_blocked: false
6060
release_blocked: false

doc/language-onboarding.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ need to be executable by any user ID within the container.
5959

6060
### Guidelines on Language Container Runtimes
6161

62-
You should be able to run the `generate` or `release-stage` commands for an API such as Google Cloud Functions in less than a
62+
You should be able to run the `generate` or `release-stage` commands for an API such as Google Cloud Secret Manager in less than a
6363
minute. We understand that some libraries may take longer to process, however, long runtimes can adversely affect your
6464
ability to roll out emergency changes. While the CLI typically calls the container only for libraries with changes, a
6565
generator update could trigger a run for all your libraries.
@@ -100,25 +100,25 @@ The container is expected to produce up to two artifacts:
100100
{
101101
"libraries": [
102102
{
103-
"id": "google-cloud-secretmanager",
103+
"id": "pubsub",
104104
"apis": [
105105
{
106-
"path": "google/cloud/secretmanager/v1",
107-
"service_config": "secretmanager_v1.yaml",
108-
"status": "new"
106+
"path": "google/cloud/pubsub/v1",
107+
"service_config": "pubsub_v1.yaml",
108+
"status": "existing"
109109
}
110110
],
111+
"source_roots": [ "pubsub" ]
111112
},
112113
{
113-
"id": "google-cloud-pubsub-v1",
114+
"id": "secretmanager",
114115
"apis": [
115116
{
116-
"path": "google/cloud/pubsub/v1",
117-
"service_config": "pubsub_v1.yaml",
118-
"status": "existing"
117+
"path": "google/cloud/secretmanager/v1",
118+
"service_config": "secretmanager_v1.yaml",
119+
"status": "new"
119120
}
120-
],
121-
"source_roots": [ "pubsub" ]
121+
]
122122
}
123123
]
124124
}
@@ -130,10 +130,10 @@ The container is expected to produce up to two artifacts:
130130

131131
```json
132132
{
133-
"id": "google-cloud-secretmanager",
133+
"id": "secretmanager",
134134
"apis": [
135135
{
136-
"path": "google/cloud/secretmanager/v1",
136+
"path": "google/cloud/secretmanager/v1"
137137
}
138138
],
139139
"source_roots": [ "secretmanager" ],
@@ -168,7 +168,7 @@ The `generate` command is where the core work of code generation happens. The co
168168

169169
```json
170170
{
171-
"id": "google-cloud-secretmanager",
171+
"id": "secretmanager",
172172
"apis": [
173173
{
174174
"path": "google/cloud/secretmanager/v1",
@@ -217,7 +217,7 @@ The `build` command is responsible for building and testing the newly generated
217217

218218
```json
219219
{
220-
"id": "google-cloud-secretmanager",
220+
"id": "secretmanager",
221221
"apis": [
222222
{
223223
"path": "google/cloud/secretmanager/v1",
@@ -276,7 +276,7 @@ global file edits. The libraries that are being released will be marked by the `
276276
{
277277
"libraries": [
278278
{
279-
"id": "google-cloud-secretmanager-v1",
279+
"id": "secretmanager",
280280
"version": "1.3.0",
281281
"changes": [
282282
{

doc/state-schema.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,17 @@ Each object in the `apis` list represents a single API and has the following fie
4141
```yaml
4242
image: "gcr.io/my-special-project/language-generator:v1.2.5"
4343
libraries:
44-
- id: "google-cloud-storage-v1"
44+
- id: "secretmanager"
4545
version: "1.15.0"
4646
last_generated_commit: "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2"
4747
apis:
48-
- path: "google/storage/v1"
49-
service_config: "storage.yaml"
48+
- path: "google/cloud/secretmanager/v1"
49+
service_config: "secretmanager_v1.yaml"
5050
source_roots:
51-
- "src/google/cloud/storage"
52-
- "test/google/cloud/storage"
51+
- "src/google/cloud/secretmanager"
52+
- "test/google/cloud/secretmanager"
5353
preserve_regex:
54-
- "src/google/cloud/storage/generated-dir/HandWrittenFile.java"
54+
- "src/google/cloud/secretmanager/generated-dir/HandWrittenFile.java"
5555
remove_regex:
56-
- "src/google/cloud/storage/generated-dir"
56+
- "src/google/cloud/secretmanager/generated-dir"
5757
```

internal/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ type Config struct {
171171
// Image is specified with the -image flag.
172172
Image string
173173

174-
// Library is the library ID to generate (e.g. google-cloud-secretmanager-v1 ).
174+
// Library is the library ID to generate (e.g. secretmanager).
175175
// This usually corresponds to a releasable language unit -- for Go this would
176176
// be a Go module or for dotnet the name of a NuGet package. If neither this nor
177177
// api is specified all currently managed libraries will be regenerated.

internal/librarian/flags.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ If not specified, the image configured in the state.yaml is used.`)
7373

7474
func addFlagLibrary(fs *flag.FlagSet, cfg *config.Config) {
7575
fs.StringVar(&cfg.Library, "library", "",
76-
`The library ID to generate or release (e.g. google-cloud-secretmanager-v1).
76+
`The library ID to generate or release (e.g. secretmanager).
7777
This corresponds to a releasable language unit.`)
7878
}
7979

0 commit comments

Comments
 (0)