Update OpenAPI spec to include Permissions OpenAPI Refactor#567
Update OpenAPI spec to include Permissions OpenAPI Refactor#567
Conversation
service/iam/api.go
Outdated
| // access for various users on different objects and endpoints. | ||
| // access for various users on different objects and endpoints: | ||
| // | ||
| // * **[Cluster permissions](clusters)** — Manage which users can manage, |
There was a problem hiding this comment.
run make doc. this may break the https://pkg.go.dev/github.com/databricks/databricks-sdk-go docs, as it points to non-existing links.
There was a problem hiding this comment.
From what I can tell, it is not possible to link to a service in our current OpenAPI model. I filed a ticket with @arusanov to support this. For now, I'm going to revert the links in this file
There was a problem hiding this comment.
yep, also in the openapi spec. this just breaks the logical flow of code comments.
| RedirectUrls []string `json:"redirect_urls"` | ||
| // OAuth scopes granted to the application. Supported scopes: all-apis, sql, | ||
| // offline_access, openid, profile, email. | ||
| Scopes []string `json:"scopes,omitempty"` |
There was a problem hiding this comment.
seems unrelated, if you're only doing permissions change :)
There was a problem hiding this comment.
This may have other OpenAPI changes in it as well, I just wanted to update ASAP to detect any potential issues.
service/pkg.go
Outdated
| // - [oauth2.OAuthEnrollmentAPI]: These APIs enable administrators to enroll OAuth for their accounts, which is required for adding/using any OAuth published/custom application integration. | ||
| // | ||
| // - [iam.PermissionsAPI]: Permissions API are used to create read, write, edit, update and manage access for various users on different objects and endpoints. | ||
| // - [iam.PermissionsAPI]: Permissions API are used to create read, write, edit, update and manage access for various users on different objects and endpoints: * **[Cluster permissions](clusters)** — Manage which users can manage, restart, or attach to clusters. |
workspace_client.go
Outdated
| // access for various users on different objects and endpoints. | ||
| // access for various users on different objects and endpoints: | ||
| // | ||
| // * **[Cluster permissions](clusters)** — Manage which users can manage, |
There was a problem hiding this comment.
we have to use different syntax for cross-service referencing or links. See Deep linking: methods, classes, and external links from http://go/openapi/spec.
can you also add a linter to prevent these from being added in universe?
There was a problem hiding this comment.
Yes, will add a linter there.
There was a problem hiding this comment.
Filed a ticket with @arusanov to add linting
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #567 +/- ##
==========================================
- Coverage 18.73% 17.97% -0.77%
==========================================
Files 85 85
Lines 9405 9805 +400
==========================================
Hits 1762 1762
- Misses 7489 7889 +400
Partials 154 154
☔ View full report in Codecov by Sentry. |
nfx
left a comment
There was a problem hiding this comment.
does godoc support bold highlighting? I don't think so... but if we want to roll it out ASAP, then just fix the sha file
.codegen/_openapi_sha
Outdated
| @@ -1 +1 @@ | |||
| fbdd0fa3e83fed2c798a58d376529bdb1285b915 No newline at end of file | |||
| universe:/Users/miles/universe No newline at end of file | |||
There was a problem hiding this comment.
looks very unintentional ;) i'd prefer if we remove the ability to put rfs into this file.
PS: I just associate refish with "a fish named RE". Can we change that? =P
There was a problem hiding this comment.
I suppose we could call it ref?
|
Bold does not seem to be supported. I filed a ticket to track better doc generation for our SDKs on the backlog. |
43476ea to
f72b016
Compare
## Changes This includes a change to how we expose the permissions-related APIs, for example (for the `JobsService`): * `GetJobPermissionLevels` -> `GetPermissionLevels` * `GetJobPermissions` -> `GetPermissions` * `SetJobPermissions` -> `SetPermissions` * `UpdateJobPermissions` -> `UpdatePermissions` These were added in #567 and first released as part of v0.15.0. ## Tests - [x] `make test` passing - [x] `make fmt` applied - [x] relevant integration tests applied



Changes
Update the Go SDK to include the updated structures for the permissions APIs.
Tests
make testpassingmake fmtapplied