Skip to content

Conversation

iamnivekx
Copy link

@iamnivekx iamnivekx commented May 23, 2025

#67

@ilkamo
Copy link

ilkamo commented May 23, 2025

@sssionggg @0xYankee-Raccoons @cmoutafidis could you please take a look at this? It’s a small change, but it improves the generated code from the OpenAPI schema, especially for strongly typed languages like Go.

@iamnivekx proposed to extend the main schema with the format field for certain integer properties to ensure the correct types (e.g., uint64) are generated. Without specifying the format, codegen tools default to a generic int, which can lead to type mismatches or overflows in some environments.

This will be super useful for the future support of https://github.com/ilkamo/jupiter-go as we use the OpenAPI schema to generate the right types.

Copy link
Contributor

@0xYankee-Raccoons 0xYankee-Raccoons left a comment

Choose a reason for hiding this comment

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

hey, commented the correct sizes

@0xYankee-Raccoons
Copy link
Contributor

also, after changing the schema, please run npm run build to generate with the new schema

@iamnivekx
Copy link
Author

@0xYankee-Raccoons
Thanks for the feedback! I've implemented the suggested changes

@0xYankee-Raccoons
Copy link
Contributor

@iamnivekx need you to run npm run build to generate with the new schema

@iamnivekx
Copy link
Author

I’ve already run npm run build, but there doesn’t seem to be any changes. Could you please check if the schema was updated correctly or let me know if there’s anything else I should do?

image

@0xYankee-Raccoons
Copy link
Contributor

let's close this PR @iamnivekx @ilkamo, we have discussed and will be using the schema from https://dev.jup.ag/docs/api/swap-api (as the aim of the schema in dev docs will be the most updated and source of truth for both team and integrators)

@iamnivekx
Copy link
Author

Wouldn’t it be better to keep the code aligned with the schema at https://dev.jup.ag/docs/api/swap-api? That helps avoid any mismatch between docs and implementation. That’s what I aimed for with this PR.

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