-
Notifications
You must be signed in to change notification settings - Fork 24
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
feat: Add JSON type schema #1796
Conversation
d8d56c2
to
bc10bdb
Compare
Adding @marianogappa as a reviewer to this because I don't have the bandwidth to dive into this and give it the proper level of attention |
dc8cd41
to
36ec297
Compare
8c9b343
to
927da7b
Compare
927da7b
to
b664157
Compare
@@ -111,17 +118,11 @@ func (t *structTransformer) addColumnFromField(field reflect.StructField, parent | |||
return nil | |||
} | |||
|
|||
columnType, err := t.typeTransformer(field) | |||
columnType, err := t.getColumnType(field) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extracted getColumnType
to a dedicated function
Sorry for the review noise, I basically re-did the PR without using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments
@@ -46,6 +46,8 @@ type Column struct { | |||
|
|||
// PrimaryKeyComponent is a flag that indicates if the column is used as part of the input to calculate the value of `_cq_id`. | |||
PrimaryKeyComponent bool `json:"primary_key_component"` | |||
|
|||
TypeSchema string `json:"type_schema,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the other fields here have docs. I think a comment is warranted on this one too 🤔
🤖 I have created a release *beep* *boop* --- ## [4.52.0](v4.51.0...v4.52.0) (2024-07-24) ### Features * Add JSON type schema ([#1796](#1796)) ([dbc534b](dbc534b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
#### Summary I missed this in #1796. Actually added the `normalizePointer` for this reason just forgot to use it for map and slice pointers ---
#### Summary Part of #2023 ~~Needs cloudquery/cloudquery-api-go#196 and~~ cloudquery/plugin-sdk#1796 ~~Still WIP~~
Summary
Part of cloudquery/cloudquery#2023
Still WIP and depends on cloudquery/cloudquery-api-go#196Use the following steps to ensure your PR is ready to be reviewed
go fmt
to format your code 🖊golangci-lint run
🚨 (install golangci-lint here)