Skip to content

Conversation

@awrichar
Copy link
Contributor

@awrichar awrichar commented May 1, 2025

No description provided.

Signed-off-by: Andrew Richardson <[email protected]>
Signed-off-by: Andrew Richardson <[email protected]>
Signed-off-by: Andrew Richardson <[email protected]>
@awrichar awrichar requested a review from a team as a code owner May 1, 2025 02:21
@awrichar
Copy link
Contributor Author

awrichar commented May 1, 2025

Note: it's actually not possible to view the diff of the generated schema online due to its size - but we do have a problem. All of the JSONAny fields in the OpenAPI schema are now typed as "string". Perhaps this changed recently in how Go outputs the schema, but it's problematic because now JSON fields (like contract location) will be typed as strings in the SDK, when they need to be any or object.

To be clear, this is an issue with how the OpenAPI is output from Go, and not with how we import it here to generate TypeScript. We need to fix the schema output in FireFly. It's not only a problem for the TypeScript SDK, but for anyone utilizing the OpenAPI schema, including from FireFly's own Swagger UI. It makes people think they need to fill in a string instead of an object for these fields.

@awrichar awrichar marked this pull request as draft May 1, 2025 02:24
@awrichar
Copy link
Contributor Author

awrichar commented May 1, 2025

Looks like the openapi behavior was intentionally changed in hyperledger/firefly-common#174 to map JSONAny to "string". I think this needs to be revisited.

@awrichar
Copy link
Contributor Author

awrichar commented May 1, 2025

Replaced by #96

@awrichar awrichar closed this May 1, 2025
@awrichar awrichar deleted the schema-1.3.3 branch May 1, 2025 15:49
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.

2 participants