Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

sra-spec: Clients generated from SRA spec think Network ID is a fractional number #1762

Open
feuGeneA opened this issue Apr 5, 2019 · 1 comment
Labels
bug 🪲 pinned @0x/sra-spec Standard Relayer API Spec

Comments

@feuGeneA
Copy link
Contributor

feuGeneA commented Apr 5, 2019

Expected Behavior

Clients generated from the SRA spec should use correct data types. Specifically, in the spec, integers should be integer, not number. More specifically, Network ID and pagination values should be integer. (There may be more, but these are what I noticed.)

Current Behavior

Network ID, and pagination values, are currently specified with "schema":{"type":"number",...}.

(There are other parameters in the spec that we correctly denote with {"type":"integer"}.)

Possible Solution

Change integral parameters to be integer rather than number. A quick look at the spec suggests that we should probably should get rid of all instances of "type":"number".

Steps to Reproduce (for bugs)

Generate a client from the spec and look at the types of the parameters. The Python SRA client's generate.sh script may be useful to reproduce the problem.

Context

We generated our Python SRA client from the spec, and the documentation came out describing Network ID and pagination parameters as floats. If we were to generate a client for a more strongly typed language, it would probably be actually broken rather than just having wrong documentation.

@feuGeneA feuGeneA added the @0x/sra-spec Standard Relayer API Spec label Apr 5, 2019
@feuGeneA feuGeneA mentioned this issue Apr 5, 2019
3 tasks
@stale
Copy link

stale bot commented May 5, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 5, 2019
@dekz dekz added the pinned label May 8, 2019
@stale stale bot removed the stale label May 8, 2019
@fabioberger fabioberger changed the title Clients generated from SRA spec think Network ID is a fractional number sra-spec: Clients generated from SRA spec think Network ID is a fractional number Jun 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug 🪲 pinned @0x/sra-spec Standard Relayer API Spec
Projects
None yet
Development

No branches or pull requests

3 participants