Mark output-only fields with doNotSuggest#3599
Conversation
|
| - Type | ||
| - Description | ||
|
|
||
| - - `artifacts_dynamic_version` |
There was a problem hiding this comment.
[optional] it would be easier to review this if catch-up regenerate with unrelated accumulated changes was sent as a separate PR first.
There was a problem hiding this comment.
Submitted #3644
If you could approve it, I'll merge it and rebase this PR
| "active_deployment": { | ||
| "description": "The active deployment of the app. A deployment is considered active when it has been deployed\nto the app compute.", | ||
| "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/apps.AppDeployment" | ||
| "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/apps.AppDeployment", |
There was a problem hiding this comment.
Question -- why not remove this fields from the schema completely?
There was a problem hiding this comment.
It is probably possible, but it requires more changes in schema traversal helpers. I decided to fix this with a less invasive quick approach just to unblock doc writers
| MarkdownExamples string `json:"markdown_examples,omitempty"` | ||
| DeprecationMessage string `json:"deprecation_message,omitempty"` | ||
| Preview string `json:"x-databricks-preview,omitempty"` | ||
| OutputOnly *bool `json:"x-databricks-field-behaviors_output_only,omitempty"` |
There was a problem hiding this comment.
Question - do we serialize this type ever? or are this annotations just in case?
Why not keep them small, e.g. "output_only"?
There was a problem hiding this comment.
Yes, example:
Question - do we serialize this type ever? or are this annotations just in case?
Why not keep them small, e.g. "output_only"?
I followed the same approach as with x-databricks-preview to highlight that this field is computed from the OpenAPI spec
…e-output-only-fields
## Changes Instead of marking output-only fields with `doNotSuggest` (see #3599), completely exclude them from the schema. This is done by: - Marking fields as `OUTPUT_ONLY` in `FieldBehaviors` during annotation - Adding removeOutputOnlyFields transformation to remove these fields - Also removing them from required lists This removes 77 output-only properties from the schema. ## Why Output-only field must not show up in the generated code for Python support. ## Tests A few fields were removed from the Python code.
Changes
doNotSuggest: trueto exclude them from autocompletionWhy
Currently, we suggest all fields in code-completion, but fields marked in the OpenAPI spec as output-only are not used by the CLI
Tests
Added unit test