Skip to content

Commit

Permalink
Fixed code generation of primitive types (#354)
Browse files Browse the repository at this point in the history
## Changes
<!-- Summary of your changes that are easy to understand -->
Use primitive types in response.

## Tests
<!-- 
How is this tested? Please see the checklist below and also describe any
other relevant tests
-->
SDK generation at current spec: `deco openapi generate-sdk py
--openapi-spec 09a7fa63d9ae243e5407941f200960ca14d48b07`
- [ ] `make test` run locally
- [ ] `make fmt` applied
- [ ] relevant integration tests applied
  • Loading branch information
tanmay-db committed Sep 20, 2023
1 parent 9369aee commit 7dd80d1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .codegen/service.py.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ self._api.do('{{.Verb}}',
{{define "method-return-type" -}}
{{if and .Wait (and (not .IsCrudRead) (not (eq .SnakeName "get_run"))) }} -> Wait[{{.Wait.Poll.Response.PascalName}}]
{{- else if .Response}} -> {{if .Response.ArrayValue -}}
Iterator[{{.Response.ArrayValue.PascalName}}]
Iterator[{{template "type" .Response.ArrayValue}}]
{{- else if .Pagination -}}
Iterator[{{.Pagination.Entity.PascalName}}]
{{- else -}}
Expand Down
4 changes: 2 additions & 2 deletions databricks/sdk/service/catalog.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions databricks/sdk/service/provisioning.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions databricks/sdk/service/sql.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7dd80d1

Please sign in to comment.