Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(core): refactor CheckNamespace endpoint and fix comment #234

Merged
merged 1 commit into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 6 additions & 11 deletions core/mgmt/v1beta/mgmt.proto
Original file line number Diff line number Diff line change
Expand Up @@ -312,21 +312,16 @@ message PatchAuthenticatedUserResponse {
}

// CheckNamespaceRequest represents a request to verify if
// a namespace has been occupied and know its type
// a namespace has been occupied
message CheckNamespaceRequest {
// CheckNamespaceRequestBody
message CheckNamespaceRequestBody {
// The resource id of to check,
string id = 1 [(google.api.field_behavior) = REQUIRED];
}
// body
CheckNamespaceRequestBody namespace = 1 [(google.api.field_behavior) = REQUIRED];
// Namespace ID to be checked
string id = 1 [(google.api.field_behavior) = REQUIRED];
}

// CheckNamespaceResponse represents a response about whether
// the queried username has been occupied
// the queried namespace has been occupied and return its type
message CheckNamespaceResponse {
// Namespace type
// Namespace type enum
enum Namespace {
// UNSPECIFIED
NAMESPACE_UNSPECIFIED = 0;
Expand All @@ -339,7 +334,7 @@ message CheckNamespaceResponse {
// Reserved
NAMESPACE_RESERVED = 4;
}
// A boolean value indicating whether the username has been occupied
// Namespace type
Namespace type = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion core/mgmt/v1beta/mgmt_public_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ service MgmtPublicService {
rpc CheckNamespace(CheckNamespaceRequest) returns (CheckNamespaceResponse) {
option (google.api.http) = {
post: "/v1beta/check-namespace"
body: "namespace"
body: "*"
};
option (google.api.method_signature) = "namespace";
}
Expand Down
33 changes: 16 additions & 17 deletions openapiv2/openapiv2.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5399,14 +5399,11 @@ paths:
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: namespace
description: body
- name: body
in: body
required: true
schema:
$ref: '#/definitions/CheckNamespaceRequestCheckNamespaceRequestBody'
required:
- namespace
$ref: '#/definitions/v1betaCheckNamespaceRequest'
tags:
- MgmtPublicService
/v1beta/connector-definitions:
Expand Down Expand Up @@ -6280,15 +6277,6 @@ definitions:
format: int32
title: exp
title: UnsignedAccessToken
CheckNamespaceRequestCheckNamespaceRequestBody:
type: object
properties:
id:
type: string
title: The resource id of to check,
title: CheckNamespaceRequestBody
required:
- id
CheckNamespaceResponseNamespace:
type: string
enum:
Expand All @@ -6304,7 +6292,7 @@ definitions:
- NAMESPACE_USER: User
- NAMESPACE_ORGANIZATION: Org
- NAMESPACE_RESERVED: Reserved
title: Namespace type
title: Namespace type enum
HealthCheckResponseServingStatus:
type: string
enum:
Expand Down Expand Up @@ -8327,15 +8315,26 @@ definitions:
title: |-
CheckConnectorResponse represents a response to fetch a
connector's current state
v1betaCheckNamespaceRequest:
type: object
properties:
id:
type: string
title: Namespace ID to be checked
title: |-
CheckNamespaceRequest represents a request to verify if
a namespace has been occupied
required:
- id
v1betaCheckNamespaceResponse:
type: object
properties:
type:
$ref: '#/definitions/CheckNamespaceResponseNamespace'
title: A boolean value indicating whether the username has been occupied
title: Namespace type
title: |-
CheckNamespaceResponse represents a response about whether
the queried username has been occupied
the queried namespace has been occupied and return its type
v1betaComponent:
type: object
properties:
Expand Down
Loading