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

Add generated files with spec improvements #159

Merged
merged 9 commits into from
Nov 27, 2024
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
12 changes: 8 additions & 4 deletions ballerina/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,14 @@ version = "1.5.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]
modules = [
{org = "ballerina", packageName = "constraint", moduleName = "constraint"}
]

[[package]]
org = "ballerina"
name = "crypto"
version = "2.6.2"
version = "2.6.3"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "time"}
Expand All @@ -61,7 +64,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "http"
version = "2.10.12"
version = "2.10.17"
dependencies = [
{org = "ballerina", name = "auth"},
{org = "ballerina", name = "cache"},
Expand Down Expand Up @@ -93,7 +96,7 @@ modules = [
[[package]]
org = "ballerina"
name = "io"
version = "1.6.0"
version = "1.6.1"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.value"}
Expand Down Expand Up @@ -283,7 +286,7 @@ modules = [
[[package]]
org = "ballerina"
name = "time"
version = "2.4.0"
version = "2.5.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]
Expand Down Expand Up @@ -316,6 +319,7 @@ org = "ballerinax"
name = "googleapis.gcalendar"
version = "4.0.2"
dependencies = [
{org = "ballerina", name = "constraint"},
{org = "ballerina", name = "http"},
{org = "ballerina", name = "log"},
{org = "ballerina", name = "os"},
Expand Down
1,020 changes: 327 additions & 693 deletions ballerina/client.bal

Large diffs are not rendered by default.

18 changes: 0 additions & 18 deletions ballerina/error.bal

This file was deleted.

16 changes: 10 additions & 6 deletions ballerina/tests/test_client.bal
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,9 @@ function testEventDelete() returns error? {
check calendarClient->/calendars/[id]/events/[eventId].delete();
}

@test:Config {}
@test:Config {
enable: false
}
function testPostCalendarAcl() returns error? {

string summary = "Test Calendar";
Expand All @@ -501,8 +503,8 @@ function testPostCalendarAcl() returns error? {
string id = check verifyAndReturnId(createdCal.id);
AclRule res = check calendarClient->/calendars/[id]/acl.post(check acl.cloneWithType(AclRule));
test:assertEquals(res.role, check acl.role);
AclRuleScope? scope = res.scope;
if scope is AclRuleScope {
AclRule_scope? scope = res.scope;
if scope is AclRule_scope {
test:assertEquals(scope.value, check acl.scope.value);
check calendarClient->/calendars/[id].delete();
}
Expand Down Expand Up @@ -662,7 +664,9 @@ function testCalendarEventInstancesGet() returns error? {
check calendarClient->/calendars/[id].delete();
}

@test:Config {}
@test:Config {
enable: false
}
function testCalendarEventMove() returns error? {
string summary = "Test Calendar";
Calendar cal = {
Expand Down Expand Up @@ -690,7 +694,7 @@ function testCalendarEventMove() returns error? {
Event createdEvent = check calendarClient->/calendars/[calId]/events.post(event);
string eventId = check verifyAndReturnId(createdEvent.id);
string calId2 = check verifyAndReturnId(createdCal2.id);
Event moveEvent = check calendarClient->/calendars/[calId]/events/[eventId]/move.post(calId2);
Event moveEvent = check calendarClient->/calendars/[calId]/events/[eventId]/move.post(destination = calId2);
test:assertEquals(moveEvent.summary, eventSummary);
check calendarClient->/calendars/[calId2]/events/[eventId].delete();
check calendarClient->/calendars/[calId2].delete();
Expand Down Expand Up @@ -834,7 +838,7 @@ function testCalendarEventQuickAdd() returns error? {
Calendar createdCal = check calendarClient->/calendars.post(cal);
string eventText = "Event created using quickAdd";
string id = check verifyAndReturnId(createdCal.id);
Event createdEvent = check calendarClient->/calendars/[id]/events/quickAdd.post(eventText);
Event createdEvent = check calendarClient->/calendars/[id]/events/quickAdd.post(text = eventText);
test:assertEquals(createdEvent.summary, eventText);
string eventId = check verifyAndReturnId(createdEvent.id);
check calendarClient->/calendars/[id]/events/[eventId].delete();
Expand Down
Loading
Loading