Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
49277c1
Updated packages for Looker 21.20
drstrangelooker Nov 8, 2021
9ccdeb0
fix: codgegen for python had a parameter called 'models' but also a v…
drstrangelooker Nov 9, 2021
1d085d4
fix: generated python api with fix for 'models' references in the met…
drstrangelooker Nov 9, 2021
a7453ed
fix: factor out code to rename parameters in python generator
drstrangelooker Nov 9, 2021
dda374e
docs: added note about linting to README
drstrangelooker Nov 9, 2021
94a6f63
fix: alias models namespace to mdls so no conflict with parameter models
drstrangelooker Nov 9, 2021
706ec45
fix: python api after aliasing the models namespace to mdls.
drstrangelooker Nov 9, 2021
d51789b
Merge branch 'main' into drstrangelove/release-21.20
drstrangelooker Nov 9, 2021
a61d062
fix: look.id is now a string but tests were checking for integer
drstrangelooker Nov 9, 2021
0ff98c4
fix: found cases asserting `look.id > 0`, changed to `look.id != "0"`
drstrangelooker Nov 9, 2021
e8200a2
fix: removed Looker 20.12 from the support matrix since it will be re…
drstrangelooker Nov 9, 2021
aabb98d
Revert "fix: removed Looker 20.12 from the support matrix"
drstrangelooker Nov 9, 2021
61e16b2
fix: fixed minor changes to specs
drstrangelooker Nov 10, 2021
ad77bbd
fix: add sdk-codegen/src tests into the mix
drstrangelooker Nov 10, 2021
1d09feb
docs: added some details to README.md on running lint
drstrangelooker Nov 10, 2021
75298ac
Merge branch 'main' into drstrangelove/release-21.20
drstrangelooker Nov 10, 2021
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
2 changes: 1 addition & 1 deletion .github/workflows/codegen-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
${{ github.workspace }}/.github/scripts/wait_for_looker.sh

- name: Run unit tests
run: yarn jest "packages/sdk-codegen(-utils|-scripts)/src" --reporters=default --reporters=jest-junit
run: yarn jest "packages/sdk-codegen(|-utils|-scripts)/src" --reporters=default --reporters=jest-junit

- name: Delete looker.ini mock
run: rm looker.ini
Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,28 @@ yarn run

to see the list of all scripts that can be run by the code generator.

After generation, the generated code might not conform with the code standards.
Changes cannot be commited until they pass the lint tests.
This can be checked with the following:
```sh
yarn lint
```

For a faster run, only the modified files can be checked with any of these
commands:
```sh
yarn lint-changed
yarn lint -q
yarn lint --quick
```

Fixes can automagically be applied with one of the following:
```sh
yarn lint-changed-fix
yarn lint -q -f
yarn lint --quick --fix
```

## SDK Examples

The [examples directory](/examples) contains code snippets and projects written using the Looker language SDKs. You may find useful code in that repository. and are also welcome to contribute additional examples.
Expand Down
2 changes: 1 addition & 1 deletion csharp/rtl/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public struct Constants

public const string DefaultApiVersion = "4.0";
public const string AgentPrefix = "CS-SDK";
public const string LookerVersion = "21.18";
public const string LookerVersion = "21.20";

public const string Bearer = "Bearer";
public const string LookerAppiId = "x-looker-appid";
Expand Down
69 changes: 47 additions & 22 deletions csharp/sdk/3.1/methods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/// SOFTWARE.
///

/// 376 API methods
/// 378 API methods

#nullable enable
using System;
Expand Down Expand Up @@ -2447,6 +2447,52 @@ public async Task<SdkResponse<Datagroup, Exception>> update_datagroup(

#endregion Datagroup: Manage Datagroups

#region DerivedTable: View Derived Table graphs

/// ### Discover information about derived tables
///
/// GET /derived_table/graph/model/{model} -> DependencyGraph
///
/// <returns><c>DependencyGraph</c> Derived Table (application/json)</returns>
///
/// <param name="model">The name of the Lookml model.</param>
/// <param name="format">The format of the graph. Valid values are [dot]. Default is `dot`</param>
/// <param name="color">Color denoting the build status of the graph. Grey = not built, green = built, yellow = building, red = error.</param>
public async Task<SdkResponse<DependencyGraph, Exception>> graph_derived_tables_for_model(
string model,
string? format = null,
string? color = null,
ITransportSettings? options = null)
{
model = SdkUtils.EncodeParam(model);
return await AuthRequest<DependencyGraph, Exception>(HttpMethod.Get, $"/derived_table/graph/model/{model}", new Values {
{ "format", format },
{ "color", color }},null,options);
}

/// ### Get the subgraph representing this derived table and its dependencies.
///
/// GET /derived_table/graph/view/{view} -> DependencyGraph
///
/// <returns><c>DependencyGraph</c> Graph of the derived table component, represented in the DOT language. (application/json)</returns>
///
/// <param name="view">The derived table's view name.</param>
/// <param name="models">The models where this derived table is defined.</param>
/// <param name="workspace">The model directory to look in, either `dev` or `production`.</param>
public async Task<SdkResponse<DependencyGraph, Exception>> graph_derived_tables_for_view(
string view,
string? models = null,
string? workspace = null,
ITransportSettings? options = null)
{
view = SdkUtils.EncodeParam(view);
return await AuthRequest<DependencyGraph, Exception>(HttpMethod.Get, $"/derived_table/graph/view/{view}", new Values {
{ "models", models },
{ "workspace", workspace }},null,options);
}

#endregion DerivedTable: View Derived Table graphs

#region Folder: Manage Folders

/// Search for folders by creator id, parent id, name, etc
Expand Down Expand Up @@ -3834,27 +3880,6 @@ public async Task<SdkResponse<TSuccess, Exception>> run_look<TSuccess>(

#region LookmlModel: Manage LookML Models

/// ### Discover information about derived tables
///
/// GET /derived_table/graph/model/{model} -> DependencyGraph
///
/// <returns><c>DependencyGraph</c> Derived Table (application/json)</returns>
///
/// <param name="model">The name of the Lookml model.</param>
/// <param name="format">The format of the graph. Valid values are [dot]. Default is `dot`</param>
/// <param name="color">Color denoting the build status of the graph. Grey = not built, green = built, yellow = building, red = error.</param>
public async Task<SdkResponse<DependencyGraph, Exception>> graph_derived_tables_for_model(
string model,
string? format = null,
string? color = null,
ITransportSettings? options = null)
{
model = SdkUtils.EncodeParam(model);
return await AuthRequest<DependencyGraph, Exception>(HttpMethod.Get, $"/derived_table/graph/model/{model}", new Values {
{ "format", format },
{ "color", color }},null,options);
}

/// ### Get information about all lookml models.
///
/// GET /lookml_models -> LookmlModel[]
Expand Down
4 changes: 2 additions & 2 deletions csharp/sdk/3.1/models.cs
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ public class Dashboard : SdkModel
/// <summary>The preferred route for viewing this dashboard (ie: dashboards or dashboards-next)</summary>
public string? preferred_viewer { get; set; } = null;
public SpaceBase? space { get; set; }
/// <summary>Enables alerts to keep in sync with dashboard filter changes - only available in Enhanced Alerts (beta)</summary>
/// <summary>Enables alerts to keep in sync with dashboard filter changes</summary>
public bool? alert_sync_with_dashboard_filter_enabled { get; set; } = null;
/// <summary>Background color</summary>
public string? background_color { get; set; } = null;
Expand Down Expand Up @@ -4532,7 +4532,7 @@ public class WriteDashboard : SdkModel
/// id, content_metadata_id, created_at, creator_id, child_count, external_id, is_embed, is_embed_shared_root, is_embed_users_root, is_personal, is_personal_descendant, is_shared_root, is_users_root, can
/// </summary>
public WriteSpaceBase? space { get; set; }
/// <summary>Enables alerts to keep in sync with dashboard filter changes - only available in Enhanced Alerts (beta)</summary>
/// <summary>Enables alerts to keep in sync with dashboard filter changes</summary>
public bool? alert_sync_with_dashboard_filter_enabled { get; set; } = null;
/// <summary>Background color</summary>
public string? background_color { get; set; } = null;
Expand Down
Loading