fix(instance-create): include review changes

This commit is contained in:
Stefan Benz 2022-11-25 14:24:53 +01:00
parent 39660044ad
commit e4260b9ac2
No known key found for this signature in database
GPG Key ID: 9D2FE4EA50BEFE68
3 changed files with 11 additions and 29 deletions

View File

@ -49,7 +49,8 @@ Returns the detail of an instance
> **rpc** AddInstance([AddInstanceRequest](#addinstancerequest))
[AddInstanceResponse](#addinstanceresponse)
deprecated: Creates a new instance with all needed setup data
Deprecated: Use CreateInstance instead
Creates a new instance with all needed setup data
This might take some time
@ -377,7 +378,7 @@ This is an empty response
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| email | string | - | string.min_len: 1<br /> string.max_len: 200<br /> |
| email | string | - | string.min_len: 1<br /> string.max_len: 200<br /> string.email: true<br /> |
| is_email_verified | bool | - | |
@ -389,10 +390,10 @@ This is an empty response
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| user_name | string | - | string.max_len: 200<br /> |
| email | CreateInstanceRequest.Email | - | message.required: true<br /> |
| profile | CreateInstanceRequest.Profile | - | message.required: false<br /> |
| password | CreateInstanceRequest.Password | - | message.required: false<br /> |
| user_name | string | - | string.max_len: 200<br /> |

View File

@ -271,16 +271,6 @@ func TestCommandSide_ChangeMachine(t *testing.T) {
),
),
),
expectFilter(
eventFromEventPusher(
org.NewDomainPolicyAddedEvent(context.Background(),
&user.NewAggregate("user1", "org1").Aggregate,
true,
true,
true,
),
),
),
),
},
args: args{
@ -315,16 +305,6 @@ func TestCommandSide_ChangeMachine(t *testing.T) {
),
),
),
expectFilter(
eventFromEventPusher(
org.NewDomainPolicyAddedEvent(context.Background(),
&user.NewAggregate("user1", "org1").Aggregate,
true,
true,
true,
),
),
),
expectPush(
[]*repository.Event{
eventFromEventPusher(

View File

@ -122,7 +122,8 @@ service SystemService {
};
}
//deprecated: Creates a new instance with all needed setup data
// Deprecated: Use CreateInstance instead
// Creates a new instance with all needed setup data
// This might take some time
rpc AddInstance(AddInstanceRequest) returns (AddInstanceResponse) {
option (google.api.http) = {
@ -430,7 +431,7 @@ message CreateInstanceRequest {
string preferred_language = 5 [(validate.rules).string = {max_len: 10}];
}
message Email {
string email = 1[(validate.rules).string = {min_len: 1, max_len: 200}];
string email = 1[(validate.rules).string = {min_len: 1, max_len: 200, email: true}];
bool is_email_verified = 2;
}
message Password {
@ -438,10 +439,10 @@ message CreateInstanceRequest {
bool password_change_required = 2;
}
message Human {
Email email = 1 [(validate.rules).message.required = true];
Profile profile = 2 [(validate.rules).message.required = false];
Password password = 3 [(validate.rules).message.required = false];
string user_name = 4 [(validate.rules).string = {max_len: 200}];
string user_name = 1 [(validate.rules).string = {max_len: 200}];
Email email = 2 [(validate.rules).message.required = true];
Profile profile = 3 [(validate.rules).message.required = false];
Password password = 4 [(validate.rules).message.required = false];
}
message PersonalAccessToken {
google.protobuf.Timestamp expiration_date = 1 [