Skip to content

Conversation

@jba
Copy link
Contributor

@jba jba commented May 24, 2024

Some new types were added, and a new aspect of JSON Schema
that the code generator didn't know about.

The new aspect is that a "$ref" can refer to a property
inside a schema. The code generator still doesn't understand
these, but the config file handles them by ignoring them or
replacing them with another type.

Some new types were added, and a new aspect of JSON Schema
that the code generator didn't know about.

The new aspect is that a "$ref" can refer to a property
inside a schema. The code generator still doesn't understand
these, but the config file handles them by ignoring them or
replacing them with another type.
@jba jba requested review from ianlancetaylor and randall77 May 24, 2024 12:30
FinishReasonUnknown FinishReason = "unknown"
)

type DataPart struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be dataPart? The other Part types (textPart, mediaPart) are not exported.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See below.

Part pkg ai
TextPart pkg ai
TextPart name textPart
TextPart.data omit
Copy link
Contributor

Choose a reason for hiding this comment

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

Any idea what these new Part fields are used for? Should we be using them in document.go somehow?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've asked Keith to look into this. I just got things working so I could continue my API refactoring.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the js side just split the part that we call "blob" into two, "media" and "data". I will make that same change in our code.

@jba jba merged commit 5360a11 into main May 24, 2024
@jba jba deleted the jba-fix-gen branch May 24, 2024 16:31
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.

3 participants