diff --git a/mockhttp.go b/mockhttp.go index fdb2d33..6d829de 100644 --- a/mockhttp.go +++ b/mockhttp.go @@ -180,7 +180,7 @@ var endpointResponseExamples = map[string]map[string]mockResponse{ Code: 200, }, "GET": mockResponse{ - Content: `{"project":{"active_time_seconds":100,"branch_logical_size_limit":0,"branch_logical_size_limit_bytes":10500,"compute_time_seconds":100,"consumption_period_end":"2023-03-01T00:00:00Z","consumption_period_start":"2023-02-01T00:00:00Z","cpu_used_sec":10,"created_at":"2022-11-23T17:42:25Z","creation_source":"console","data_storage_bytes_hour":1040,"data_transfer_bytes":1000000,"history_retention_seconds":604800,"id":"shiny-wind-028834","name":"shiny-wind-028834","owner":{"branches_limit":10,"email":"some@email.com","subscription_type":"scale"},"owner_id":"1232111","pg_version":15,"platform_id":"aws","provisioner":"k8s-pod","proxy_host":"us-east-2.aws.neon.tech","region_id":"aws-us-east-2","store_passwords":true,"updated_at":"2022-11-23T17:42:25Z","written_data_bytes":100800}}`, + Content: `{"project":{"active_time_seconds":100,"branch_logical_size_limit":0,"branch_logical_size_limit_bytes":10500,"compute_time_seconds":100,"consumption_period_end":"2023-03-01T00:00:00Z","consumption_period_start":"2023-02-01T00:00:00Z","cpu_used_sec":10,"created_at":"2022-11-23T17:42:25Z","creation_source":"console","data_storage_bytes_hour":1040,"data_transfer_bytes":1000000,"history_retention_seconds":604800,"id":"shiny-wind-028834","name":"shiny-wind-028834","owner":{"branches_limit":10,"email":"some@email.com","name":"John Smith","subscription_type":"scale"},"owner_id":"1232111","pg_version":15,"platform_id":"aws","provisioner":"k8s-pod","proxy_host":"us-east-2.aws.neon.tech","region_id":"aws-us-east-2","store_passwords":true,"updated_at":"2022-11-23T17:42:25Z","written_data_bytes":100800}}`, Code: 200, }, "PATCH": mockResponse{ diff --git a/openAPIDefinition.json b/openAPIDefinition.json index b709ed7..2b88b02 100644 --- a/openAPIDefinition.json +++ b/openAPIDefinition.json @@ -589,6 +589,7 @@ "cpu_used_sec": 10, "owner_id": "1232111", "owner": { + "name": "John Smith", "email": "some@email.com", "branches_limit": 10, "subscription_type": "scale" @@ -4497,6 +4498,7 @@ "created_at": "2022-12-13T01:30:55Z", "updated_at": "2022-12-13T01:30:55Z", "owner": { + "name": "John Smith", "email": "some@email.com", "branches_limit": 10, "subscription_type": "scale" @@ -5386,7 +5388,7 @@ ], "properties": { "connection_uri": { - "description": "The connection URI is defined as specified here: [Connection URIs](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING-URIS)\nThe connection URI can be used to connect to a Postgres database with psql or defined in a DATABASE_URL environment variable.\n", + "description": "The connection URI is defined as specified here: [Connection URIs](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING-URIS)\nThe connection URI can be used to connect to a Postgres database with psql or defined in a DATABASE_URL environment variable.\nWhen creating a branch from a parent with more than one role or database, the response body does not include a connection URI.\n", "type": "string" }, "connection_parameters": { @@ -6958,6 +6960,7 @@ "type": "object", "required": [ "email", + "name", "branches_limit", "subscription_type" ], @@ -6965,6 +6968,9 @@ "email": { "type": "string" }, + "name": { + "type": "string" + }, "branches_limit": { "type": "integer" }, diff --git a/sdk.go b/sdk.go index 7bcdaf9..2bd1dbb 100644 --- a/sdk.go +++ b/sdk.go @@ -1174,6 +1174,7 @@ type ConnectionDetails struct { ConnectionParameters ConnectionParameters `json:"connection_parameters"` // ConnectionURI The connection URI is defined as specified here: [Connection URIs](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING-URIS) // The connection URI can be used to connect to a Postgres database with psql or defined in a DATABASE_URL environment variable. + // When creating a branch from a parent with more than one role or database, the response body does not include a connection URI. ConnectionURI string `json:"connection_uri"` } @@ -1889,6 +1890,7 @@ type ProjectListItem struct { type ProjectOwnerData struct { BranchesLimit int `json:"branches_limit"` Email string `json:"email"` + Name string `json:"name"` SubscriptionType BillingSubscriptionType `json:"subscription_type"` }