Skip to content
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

Change output format type to str #80

Closed
wants to merge 2 commits into from

Conversation

Alliad
Copy link
Collaborator

@Alliad Alliad commented Mar 26, 2024

@dzmitry-lahoda , check, please, schema:

[
{
"out_asset_amount": "string",
"out_asset_id": "string",
"in_asset_amount": "string",
"in_asset_id": "string",
"next": [
{
"out_asset_amount": "string",
"out_asset_id": "string",
"in_asset_amount": "string",
"in_asset_id": "string",
"pool_id": "string",
"next": [
{},
{
"out_asset_amount": "string",
"out_asset_id": "string",
"in_asset_amount": "string",
"in_asset_id": "string",
"next": [
"string",
"string"
]
}
]
},
{
"out_asset_amount": "string",
"out_asset_id": "string",
"in_asset_amount": "string",
"in_asset_id": "string",
"pool_id": "string",
"next": [
"string",
"string"
]
}
]
}
]

@dzmitry-lahoda
Copy link
Contributor

simple fields seems correct in schema. all correct.

so

"next": [
"string",
"string"
]

fields wrong.

@dzmitry-lahoda
Copy link
Contributor

@Alliad may you test change works? like call API endpoint?

@dzmitry-lahoda
Copy link
Contributor

dzmitry-lahoda commented Mar 26, 2024

so what should work:

  1. ids, amounts in json schema are strings
  2. next - is stuctured object
  3. in python code generic type of amount is int(integer) and/or float, but NOT str(string).
  4. calling endpoint to find route should work as I shown before (recall video I shared)
  5. Input also to be string for id and amount, but parsed into int for amount
  6. tests and typechecks passed before should work after changes (construction of output/input instances to pass type checker and be creatable)

thing check how it looks/works before your changes and after

@dzmitry-lahoda
Copy link
Contributor

@Alliad how it is going? we may try pair programming

@dzmitry-lahoda
Copy link
Contributor

or may you comment what is working/what not. what this PR fixes from things dicussed. 1. enpoint works or not with and without pr. 2. serde is str or not in this pr 3. schema str or not for next field

@Alliad
Copy link
Collaborator Author

Alliad commented Apr 1, 2024

or may you comment what is working/what not. what this PR fixes from things dicussed. 1. enpoint works or not with and without pr. 2. serde is str or not in this pr 3. schema str or not for next field

  1. For me, endpoint dont work from that PR and from last changes in main and from commit c01fde9
  2. This PR should fix str in json-schema and 3.) in next field, but I cant test this

I am currently investigating why the route search is not working.

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