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

Added OnlyPayload property for method #522

Merged
merged 2 commits into from
Jun 20, 2023
Merged

Added OnlyPayload property for method #522

merged 2 commits into from
Jun 20, 2023

Conversation

andrewnester
Copy link
Contributor

Changes

Added OnlyPayload property for method

Tests

  • make test passing
  • make fmt applied
  • relevant integration tests applied

@andrewnester andrewnester requested review from pietern and nfx June 19, 2023 12:20
@codecov-commenter
Copy link

codecov-commenter commented Jun 19, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.01 ⚠️

Comparison is base (15f8def) 18.76% compared to head (1cc1928) 18.76%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #522      +/-   ##
==========================================
- Coverage   18.76%   18.76%   -0.01%     
==========================================
  Files          85       85              
  Lines        9187     9188       +1     
==========================================
  Hits         1724     1724              
- Misses       7315     7316       +1     
  Partials      148      148              
Impacted Files Coverage Δ
openapi/code/method.go 15.71% <0.00%> (-0.12%) ⬇️
openapi/model.go 6.25% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@pietern pietern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this mean? Not familiar with the property.

@andrewnester
Copy link
Contributor Author

@pietern renamed to JsonOnly to better reflect the intention

@@ -154,6 +154,10 @@ func (m *Method) IsCrudCreate() bool {
return m.operation.Crud == "create"
}

func (m *Method) JsonOnly() bool {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func (m *Method) JsonOnly() bool {
func (m *Method) IsJsonOnly() bool {

@andrewnester andrewnester merged commit 2ef2407 into main Jun 20, 2023
@andrewnester andrewnester deleted the only-payload branch June 20, 2023 09:14
@pietern pietern mentioned this pull request Jun 20, 2023
3 tasks
andrewnester added a commit to databricks/cli that referenced this pull request Jun 21, 2023
## Changes
Fixed jobs create command to only accept JSON payload.

Note: relies on this PR from Go SDK
databricks/databricks-sdk-go#522

## Tests

```
andrew.nester@HFW9Y94129 cli % ./cli jobs create -h
Create a new job.

  Create a new job.

Usage:
  databricks jobs create [flags]

Flags:
  -h, --help        help for create
      --json JSON   either inline JSON string or @path/to/file.json with request body (default JSON (0 bytes))

Global Flags:
  -e, --environment string       bundle environment to use (if applicable)
      --log-file file            file to write logs to (default stderr)
      --log-format type          log output format (text or json) (default text)
      --log-level format         log level (default disabled)
  -o, --output type              output type: text or json (default text)
  -p, --profile string           ~/.databrickscfg profile
      --progress-format format   format for progress logs (append, inplace, json) (default default)
 ```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants