Skip to content

Commit

Permalink
feat: added support for force field for API and API version deletion
Browse files Browse the repository at this point in the history
docs: updated proto comments to align with the public documentation

Clients can now set the `force` field while sending delete request to allow cascade deletion of resources in the registry.

PiperOrigin-RevId: 468760464
  • Loading branch information
Google APIs authored and Copybara-Service committed Aug 19, 2022
1 parent ed55a83 commit b965a25
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 102 deletions.
2 changes: 1 addition & 1 deletion google/cloud/apigeeregistry/v1/provisioning_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ message Instance {
}

// Format: `projects/*/locations/*/instance`.
// Currently only locations/global is supported.
// Currently only `locations/global` is supported.
string name = 1;

// Output only. Creation timestamp.
Expand Down
44 changes: 22 additions & 22 deletions google/cloud/apigeeregistry/v1/registry_models.proto
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ option java_package = "com.google.cloud.apigeeregistry.v1";
option php_namespace = "Google\\Cloud\\ApigeeRegistry\\V1";
option ruby_package = "Google::Cloud::ApigeeRegistry::V1";

// An Api is a top-level description of an API.
// Apis are produced by producers and are commitments to provide services.
// A top-level description of an API.
// Produced by producers and are commitments to provide services.
message Api {
option (google.api.resource) = {
type: "apigeeregistry.googleapis.com/Api"
Expand All @@ -53,17 +53,17 @@ message Api {

// A user-definable description of the availability of this service.
// Format: free-form, but we expect single words that describe availability,
// e.g. "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN".
// e.g., "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN".
string availability = 6;

// The recommended version of the API.
// Format: apis/{api}/versions/{version}
// Format: `apis/{api}/versions/{version}`
string recommended_version = 7 [(google.api.resource_reference) = {
type: "apigeeregistry.googleapis.com/ApiVersion"
}];

// The recommended deployment of the API.
// Format: apis/{api}/deployments/{deployment}
// Format: `apis/{api}/deployments/{deployment}`
string recommended_deployment = 8 [(google.api.resource_reference) = {
type: "apigeeregistry.googleapis.com/ApiDeployment"
}];
Expand All @@ -73,13 +73,13 @@ message Api {
//
// Label keys and values can be no longer than 64 characters
// (Unicode codepoints), can only contain lowercase letters, numeric
// characters, underscores and dashes. International characters are allowed.
// characters, underscores, and dashes. International characters are allowed.
// No more than 64 user labels can be associated with one resource (System
// labels are excluded).
//
// See https://goo.gl/xmQnxf for more information and examples of labels.
// System reserved label keys are prefixed with
// "apigeeregistry.googleapis.com/" and cannot be changed.
// `apigeeregistry.googleapis.com/` and cannot be changed.
map<string, string> labels = 9;

// Annotations attach non-identifying metadata to resources.
Expand All @@ -90,7 +90,7 @@ message Api {
map<string, string> annotations = 10;
}

// An ApiVersion describes a particular version of an API.
// Describes a particular version of an API.
// ApiVersions are what consumers actually use.
message ApiVersion {
option (google.api.resource) = {
Expand All @@ -115,7 +115,7 @@ message ApiVersion {

// A user-definable description of the lifecycle phase of this API version.
// Format: free-form, but we expect single words that describe API maturity,
// e.g. "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION",
// e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION",
// "DEPRECATED", "RETIRED".
string state = 6;

Expand All @@ -130,7 +130,7 @@ message ApiVersion {
//
// See https://goo.gl/xmQnxf for more information and examples of labels.
// System reserved label keys are prefixed with
// "apigeeregistry.googleapis.com/" and cannot be changed.
// `apigeeregistry.googleapis.com/` and cannot be changed.
map<string, string> labels = 7;

// Annotations attach non-identifying metadata to resources.
Expand All @@ -141,11 +141,11 @@ message ApiVersion {
map<string, string> annotations = 8;
}

// An ApiSpec describes a version of an API in a structured way.
// Describes a version of an API in a structured way.
// ApiSpecs provide formal descriptions that consumers can use to use a version.
// ApiSpec resources are intended to be fully-resolved descriptions of an
// ApiVersion. When specs consist of multiple files, these should be bundled
// together (e.g. in a zip archive) and stored as a unit. Multiple specs can
// together (e.g., in a zip archive) and stored as a unit. Multiple specs can
// exist to provide representations in different API description formats.
// Synchronization of these representations would be provided by tooling and
// background services.
Expand Down Expand Up @@ -183,8 +183,8 @@ message ApiSpec {

// A style (format) descriptor for this spec that is specified as a Media Type
// (https://en.wikipedia.org/wiki/Media_type). Possible values include
// "application/vnd.apigee.proto", "application/vnd.apigee.openapi", and
// "application/vnd.apigee.graphql", with possible suffixes representing
// `application/vnd.apigee.proto`, `application/vnd.apigee.openapi`, and
// `application/vnd.apigee.graphql`, with possible suffixes representing
// compression types. These hypothetical names are defined in the vendor tree
// defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final.
// Content types can specify compression. Currently only GZip compression is
Expand Down Expand Up @@ -221,7 +221,7 @@ message ApiSpec {
//
// See https://goo.gl/xmQnxf for more information and examples of labels.
// System reserved label keys are prefixed with
// "apigeeregistry.googleapis.com/" and cannot be changed.
// `apigeeregistry.googleapis.com/` and cannot be changed.
map<string, string> labels = 14;

// Annotations attach non-identifying metadata to resources.
Expand All @@ -232,7 +232,7 @@ message ApiSpec {
map<string, string> annotations = 15;
}

// An ApiDeployment describes a service running at particular address that
// Describes a service running at particular address that
// provides a particular version of an API. ApiDeployments have revisions which
// correspond to different configurations of a single deployment in time.
// Revision identifiers should be updated whenever the served API spec or
Expand Down Expand Up @@ -269,9 +269,9 @@ message ApiDeployment {
// Output only. Last update timestamp: when the represented revision was last modified.
google.protobuf.Timestamp revision_update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];

// The full resource name (including revision id) of the spec of the API being
// The full resource name (including revision ID) of the spec of the API being
// served by the deployment. Changes to this value will update the revision.
// Format: apis/{api}/deployments/{deployment}
// Format: `apis/{api}/deployments/{deployment}`
string api_spec_revision = 8 [(google.api.resource_reference) = {
type: "apigeeregistry.googleapis.com/ApiSpec"
}];
Expand All @@ -280,7 +280,7 @@ message ApiDeployment {
// update the revision.
string endpoint_uri = 9;

// The address of the external channel of the API (e.g. the Developer
// The address of the external channel of the API (e.g., the Developer
// Portal). Changes to this value will not affect the revision.
string external_channel_uri = 10;

Expand All @@ -303,7 +303,7 @@ message ApiDeployment {
//
// See https://goo.gl/xmQnxf for more information and examples of labels.
// System reserved label keys are prefixed with
// "apigeeregistry.googleapis.com/" and cannot be changed.
// `apigeeregistry.googleapis.com/` and cannot be changed.
map<string, string> labels = 14;

// Annotations attach non-identifying metadata to resources.
Expand All @@ -318,8 +318,8 @@ message ApiDeployment {
// and are used to store metadata that is too large or numerous to be stored
// directly on the resource. Since artifacts are stored separately from parent
// resources, they should generally be used for metadata that is needed
// infrequently, i.e. not for display in primary views of the resource but
// perhaps displayed or downloaded upon request. The ListArtifacts method
// infrequently, i.e., not for display in primary views of the resource but
// perhaps displayed or downloaded upon request. The `ListArtifacts` method
// allows artifacts to be quickly enumerated and checked for presence without
// downloading their (potentially-large) contents.
message Artifact {
Expand Down
Loading

0 comments on commit b965a25

Please sign in to comment.