Skip to content

Commit

Permalink
Merge pull request #431 from DinoChiesa/dino-mark-display-name-reqd
Browse files Browse the repository at this point in the history
fix: mark --display-name required in crtprod.go
  • Loading branch information
ssvaidyanathan authored Mar 12, 2024
2 parents 50599fd + 9d5dfbe commit 05dc69b
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion internal/cmd/products/crtprod.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2020-2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -70,6 +70,25 @@ var CreateCmd = &cobra.Command{

return err
},
Example: `Create an API product, using externally defined operations, with auto approval and access=public:
apigeecli products create --name "$product_name" \
--display-name "$product_name" \
--opgrp "$ops_file" \
--envs "$env" \
--approval auto \
--attrs access=public \
--token $TOKEN
Create an API product, using externally defined operations, with auto approval and access=public, and a quota of 100/minute:
apigeecli products create --name "$product_name" \
--display-name "$product_name" \
--opgrp "$ops_file" \
--envs "$env" \
--approval auto \
--attrs access=public \
--quota 100 --interval 1 --unit minute \
--token $TOKEN
`,
}

var operationGroupFile, gqlOperationGroupFile, grpcOperationGroupFile, quotaCounterScope string
Expand Down Expand Up @@ -108,5 +127,6 @@ func init() {
// TODO: apiresource -r later

_ = CreateCmd.MarkFlagRequired("name")
_ = CreateCmd.MarkFlagRequired("display-name")
_ = CreateCmd.MarkFlagRequired("approval")
}

0 comments on commit 05dc69b

Please sign in to comment.